1
0
mirror of synced 2025-02-07 15:59:27 +03:00
This commit is contained in:
zYne 2007-09-23 20:52:43 +00:00
parent 6395d94549
commit c5b694c56f

View File

@ -257,7 +257,7 @@ class Test extends Doctrine_Record {
Consider the following definition: Consider the following definition:
<?php <code type="php">
class Example extends Doctrine_Record class Example extends Doctrine_Record
{ {
public function setTableDefinition() public function setTableDefinition()
@ -307,41 +307,38 @@ class Example extends Doctrine_Record
'type' => 'blob', 'type' => 'blob',
)); ));
} }
?> </code>
The above example will create a database table as such in Pgsql: The above example will create a database table as such in Pgsql:
|| Column || Type || Not Null Default comment || Column || Type || Not Null ||Default || comment ||
|| id || character(32) || id || character(32) || || || ||
|| somename || character || varying(12) || somename || character || varying(12) || || || ||
|| somedate || date || somedate || date || || || ||
|| sometimestamp || timestamp without time zone || sometimestamp || timestamp without time zone || || || ||
|| someboolean || boolean || someboolean || boolean || || || ||
|| somedecimal || numeric(18,2) || somedecimal || numeric(18,2) || || || ||
|| somefloat || double precision || somefloat || double precision || || || ||
|| sometime || time without time zone NOT NULL '12:34:05'::time without time zone || sometime || time without time zone || NOT NULL || '12:34:05' || ||
|| someclob || text || someclob || text || || || ||
|| someblob || bytea || someblob || bytea || || || ||
And the following table in Mysql: And the following table in Mysql:
|| Field Type Collation Attributes Null Default comment || Field || Type || Collation || Attributes || Null || Default || comment ||
id char(32) YES || id || char(32) || || || YES || || ||
somename varchar(12) latin1_swedish_ci YES || somename || varchar(12) || latin1_swedish_ci || || YES || || ||
somedate date YES || somedate || date || || || YES || || ||
sometimestamp timestamp without time zone YES || sometimestamp || timestamp without time zone || || || YES || || ||
someboolean tinyint(1) YES || someboolean || tinyint(1) || || || YES || || ||
somedecimal decimal(18,2) YES || somedecimal || decimal(18,2) || || || YES || || ||
somefloat double YES || somefloat || double || || || YES || || ||
sometime time NO 12:34:05 || sometime || time || || || NO || 12:34:05 || ||
someclob longtext latin1_swedish_ci YES || someclob || longtext || latin1_swedish_ci || || YES || || ||
someblob longblob binary YES || someblob || longblob || || binary || YES || || ||