|
Doctrine 1.2.4
|
Public Member Functions | |
| addColumn ($tableName, $columnName, $type, $length=null, array $options=array()) | |
| addIndex ($tableName, $indexName, array $definition) | |
| changeColumn ($tableName, $columnName, $type=null, $length=null, array $options=array()) | |
| column ($upDown, $tableName, $columnName, $type=null, $length=null, array $options=array()) | |
| constraint ($upDown, $tableName, $constraintName, array $definition) | |
| createConstraint ($tableName, $constraintName, array $definition) | |
| createForeignKey ($tableName, $name, array $definition) | |
| createPrimaryKey ($tableName, $columnNames) | |
| createTable ($tableName, array $fields=array(), array $options=array()) | |
| dropConstraint ($tableName, $constraintName, $primary=false) | |
| dropForeignKey ($tableName, $name) | |
| dropPrimaryKey ($tableName, $columnNames) | |
| dropTable ($tableName) | |
| foreignKey ($upDown, $tableName, $name, array $definition=array()) | |
| getChanges () | |
| index ($upDown, $tableName, $indexName, array $definition=array()) | |
| primaryKey ($direction, $tableName, $columnNames) | |
| removeColumn ($tableName, $columnName) | |
| removeIndex ($tableName, $indexName) | |
| renameColumn ($tableName, $oldColumnName, $newColumnName) | |
| renameTable ($oldTableName, $newTableName) | |
| table ($upDown, $tableName, array $fields=array(), array $options=array()) | |
Static Public Member Functions | |
| static | getDefaultTableOptions () |
| static | setDefaultTableOptions (array $options) |
Protected Member Functions | |
| _addChange ($type, array $change=array()) | |
|
protected |
Add a change to the stack of changes to execute
| string | $type | The type of change |
| array | $change | The array of information for the change |
Definition at line 78 of file Base.php.
| Doctrine_Migration_Base::addColumn | ( | $tableName, | |
| $columnName, | |||
| $type, | |||
$length = null, |
|||
| array | $options = array() |
||
| ) |
Add a add column change.
| string | $tableName | Name of the table |
| string | $columnName | Name of the column |
| string | $type | Type of the column |
| string | $length | Length of the column |
| array | $options | Array of options for the column |
| Doctrine_Migration_Base::addIndex | ( | $tableName, | |
| $indexName, | |||
| array | $definition | ||
| ) |
| Doctrine_Migration_Base::changeColumn | ( | $tableName, | |
| $columnName, | |||
$type = null, |
|||
$length = null, |
|||
| array | $options = array() |
||
| ) |
Add a change column change
| string | $tableName | Name of the table to change the column on |
| string | $columnName | Name of the column to change |
| string | $type | New type of column |
| string | $length | The length of the column |
| array | $options | New options for the column |
Definition at line 441 of file Base.php.
| Doctrine_Migration_Base::column | ( | $upDown, | |
| $tableName, | |||
| $columnName, | |||
$type = null, |
|||
$length = null, |
|||
| array | $options = array() |
||
| ) |
Add a add or remove column change.
| string | $upDown | Whether to add the up(add) or down(remove) column change. |
| string | $tableName | Name of the table |
| string | $columnName | Name of the column |
| string | $type | Type of the column |
| string | $length | Length of the column |
| array | $options | Array of options for the column |
Definition at line 377 of file Base.php.
| Doctrine_Migration_Base::constraint | ( | $upDown, | |
| $tableName, | |||
| $constraintName, | |||
| array | $definition | ||
| ) |
Add a create or drop constraint change.
| string | $upDown | Whether to add the up(create) or down(drop) create change. |
| string | $tableName | Name of the table. |
| string | $constraintName | Name of the constraint. |
| array | $definition | Array for the constraint definition. |
| Doctrine_Migration_Base::createConstraint | ( | $tableName, | |
| $constraintName, | |||
| array | $definition | ||
| ) |
Add a create constraint change.
| string | $tableName | Name of the table. |
| string | $constraintname | Name of the constraint. |
| array | $definition | Array for the constraint definition. |
| Doctrine_Migration_Base::createForeignKey | ( | $tableName, | |
| $name, | |||
| array | $definition | ||
| ) |
Add a create foreign key change.
| string | $tableName | Name of the table. |
| string | $name | Name of the foreign key. |
| array | $definition | Array for the foreign key definition |
| Doctrine_Migration_Base::createPrimaryKey | ( | $tableName, | |
| $columnNames | |||
| ) |
Convenience method for creating primary keys
[php]
$columns = array(
'id' => array(
'type' => 'integer
'autoincrement' => true
)
);
$this->createPrimaryKey('my_table', $columns);
Equivalent to doing:
| string | $tableName | Name of the table |
| string | $columnNames | Array of column names and column definitions |
Definition at line 245 of file Base.php.
| Doctrine_Migration_Base::createTable | ( | $tableName, | |
| array | $fields = array(), |
||
| array | $options = array() |
||
| ) |
Add a create table change.
| string | $tableName | Name of the table |
| array | $fields | Array of fields for table |
| array | $options | Array of options for the table |
| Doctrine_Migration_Base::dropConstraint | ( | $tableName, | |
| $constraintName, | |||
$primary = false |
|||
| ) |
Add a drop constraint change.
| string | $tableName | Name of the table. |
| string | $constraintname | Name of the constraint. |
| Doctrine_Migration_Base::dropForeignKey | ( | $tableName, | |
| $name | |||
| ) |
Add a drop foreign key change.
| string | $tableName | Name of the table. |
| string | $name | Name of the foreign key. |
| Doctrine_Migration_Base::dropPrimaryKey | ( | $tableName, | |
| $columnNames | |||
| ) |
Convenience method for dropping primary keys.
[php]
$columns = array(
'id' => array(
'type' => 'integer
'autoincrement' => true
)
);
$this->dropPrimaryKey('my_table', $columns);
Equivalent to doing:
| string | $tableName | Name of the table |
| string | $columnNames | Array of column names and column definitions |
Definition at line 304 of file Base.php.
| Doctrine_Migration_Base::dropTable | ( | $tableName | ) |
| Doctrine_Migration_Base::foreignKey | ( | $upDown, | |
| $tableName, | |||
| $name, | |||
| array | $definition = array() |
||
| ) |
Add a create or drop foreign key change.
| string | $upDown | Whether to add the up(create) or down(drop) foreign key change. |
| string | $tableName | Name of the table. |
| string | $name | Name of the foreign key. |
| array | $definition | Array for the foreign key definition |
Definition at line 333 of file Base.php.
| Doctrine_Migration_Base::getChanges | ( | ) |
|
static |
Returns the default options for tables created using Doctrine_Migration_Base::createTable()
Definition at line 106 of file Base.php.
| Doctrine_Migration_Base::index | ( | $upDown, | |
| $tableName, | |||
| $indexName, | |||
| array | $definition = array() |
||
| ) |
Add a add or remove index change.
| string | $upDown | Whether to add the up(add) or down(remove) index change. |
| string | $tableName | Name of the table |
| string | $indexName | Name of the index |
| array | $definition | Array for the index definition |
| Doctrine_Migration_Base::primaryKey | ( | $direction, | |
| $tableName, | |||
| $columnNames | |||
| ) |
Convenience method for creating or dropping primary keys.
| string | $direction | |
| string | $tableName | Name of the table |
| string | $columnNames | Array of column names and column definitions |
Definition at line 214 of file Base.php.
| Doctrine_Migration_Base::removeColumn | ( | $tableName, | |
| $columnName | |||
| ) |
| Doctrine_Migration_Base::removeIndex | ( | $tableName, | |
| $indexName | |||
| ) |
| Doctrine_Migration_Base::renameColumn | ( | $tableName, | |
| $oldColumnName, | |||
| $newColumnName | |||
| ) |
Add a rename column change
| string | $tableName | Name of the table to rename the column on |
| string | $oldColumnName | The old column name |
| string | $newColumnName | The new column name |
| Doctrine_Migration_Base::renameTable | ( | $oldTableName, | |
| $newTableName | |||
| ) |
Add a rename table change
| string | $oldTableName | Name of the table to change |
| string | $newTableName | Name to change the table to |
|
static |
Sets the default options for tables created using Doctrine_Migration_Base::createTable()
| array | $options |
Definition at line 96 of file Base.php.
| Doctrine_Migration_Base::table | ( | $upDown, | |
| $tableName, | |||
| array | $fields = array(), |
||
| array | $options = array() |
||
| ) |
Add a create or drop table change.
| string | $upDown | Whether to add the up(create) or down(drop) table change. |
| string | $tableName | Name of the table |
| array | $fields | Array of fields for table |
| array | $options | Array of options for the table |