1
0
mirror of synced 2025-02-22 15:13:13 +03:00
This commit is contained in:
zYne 2007-01-12 00:40:50 +00:00
parent 69a2490a63
commit 75d4ddd141
2 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,35 @@
<?php ?>
Doctrine offers various table options. All table options can be set via Doctrine_Record::option($optionName, $value)
<br \><br \>
For example if you are using Mysql and want to use INNODB tables it can be done as follows:
<br \><br \>
<?php
renderCode("<?php
class MyInnoDbRecord extends Doctrine_Record
{
public function setTableDefinition()
{
\$this->hasColumn('name', 'string');
\$this->option('engine', 'INNODB');
}
}
?>");
?> <br \><br \>
In the following example we set the collate and character set options:
<br \><br \>
<?php
renderCode("<?php
class MyCustomOptionRecord extends Doctrine_Record
{
public function setTableDefinition()
{
\$this->hasColumn('name', 'string');
\$this->option('collate', 'utf8_unicode_ci');
\$this->option('charset', 'utf8');
}
}
?>");
?>

View File

@ -102,6 +102,7 @@ $menu = array('Getting started' =>
'Introduction', 'Introduction',
'Table and class naming', 'Table and class naming',
'Field(Column) naming', 'Field(Column) naming',
'Table options',
'Data types and lengths', 'Data types and lengths',
'Constraints and validators', 'Constraints and validators',
'Default values', 'Default values',