Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
75d4ddd1
Commit
75d4ddd1
authored
Jan 12, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
69a2490a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
Getting started - Setting table definition - Table options.php
...ng started - Setting table definition - Table options.php
+35
-0
documentation.php
manual/documentation.php
+1
-0
No files found.
manual/docs/Getting started - Setting table definition - Table options.php
0 → 100644
View file @
75d4ddd1
<?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');
}
}
?>"
);
?>
manual/documentation.php
View file @
75d4ddd1
...
...
@@ -102,6 +102,7 @@ $menu = array('Getting started' =>
'Introduction'
,
'Table and class naming'
,
'Field(Column) naming'
,
'Table options'
,
'Data types and lengths'
,
'Constraints and validators'
,
'Default values'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment