|
Doctrine 1.2.4
|
Inherits Doctrine_Builder.
Public Member Functions | |
| __construct ($migrationsPath=null) | |
| buildAddColumn ($tableName, $columnName, $column) | |
| buildAddIndex ($tableName, $indexName, $index) | |
| buildChangeColumn ($tableName, $columnName, $column) | |
| buildCreateForeignKey ($tableName, $definition) | |
| buildCreateTable ($tableData) | |
| buildDropForeignKey ($tableName, $definition) | |
| buildDropTable ($tableData) | |
| buildMigrationClass ($className, $fileName=null, $options=array(), $up=null, $down=null) | |
| buildRemoveColumn ($tableName, $columnName, $column) | |
| buildRemoveIndex ($tableName, $indexName, $index) | |
| generateMigrationClass ($className, $options=array(), $up=null, $down=null, $return=false) | |
| generateMigrationsFromDb () | |
| generateMigrationsFromDiff (Doctrine_Migration_Diff $diff) | |
| generateMigrationsFromModels ($modelsPath=null, $modelLoading=null) | |
| getMigrationsPath () | |
| setMigrationsPath ($path) | |
| varExport ($var) | |
Protected Member Functions | |
| loadTemplate () | |
Definition at line 34 of file Builder.php.
| Doctrine_Migration_Builder::__construct | ( | $migrationsPath = null | ) |
Instantiate new instance of the Doctrine_Migration_Builder class
$builder = new Doctrine_Migration_Builder('/path/to/migrations');
Definition at line 73 of file Builder.php.
| Doctrine_Migration_Builder::buildAddColumn | ( | $tableName, | |
| $columnName, | |||
| $column | |||
| ) |
Build the code for adding columns
| string | $tableName | |
| string | $columnName | |
| string | $column |
Definition at line 411 of file Builder.php.
| Doctrine_Migration_Builder::buildAddIndex | ( | $tableName, | |
| $indexName, | |||
| $index | |||
| ) |
Build the code for adding indexes
| string | $tableName | |
| string | $indexName | |
| string | $index |
Definition at line 456 of file Builder.php.
| Doctrine_Migration_Builder::buildChangeColumn | ( | $tableName, | |
| $columnName, | |||
| $column | |||
| ) |
Build the code for changing columns
| string | $tableName | |
| string | $columnName | |
| string | $column |
Definition at line 440 of file Builder.php.
| Doctrine_Migration_Builder::buildCreateForeignKey | ( | $tableName, | |
| $definition | |||
| ) |
Build the code for creating foreign keys
| string | $tableName | |
| array | $definition |
Definition at line 347 of file Builder.php.
| Doctrine_Migration_Builder::buildCreateTable | ( | $tableData | ) |
Build the code for creating tables
| string | $tableData |
Definition at line 370 of file Builder.php.
| Doctrine_Migration_Builder::buildDropForeignKey | ( | $tableName, | |
| $definition | |||
| ) |
Build the code for dropping foreign keys
| string | $tableName | |
| array | $definition |
Definition at line 359 of file Builder.php.
| Doctrine_Migration_Builder::buildDropTable | ( | $tableData | ) |
Build the code for dropping tables
| string | $tableData |
Definition at line 398 of file Builder.php.
| Doctrine_Migration_Builder::buildMigrationClass | ( | $className, | |
$fileName = null, |
|||
$options = array(), |
|||
$up = null, |
|||
$down = null |
|||
| ) |
Build the code for a migration class
| string | $className | Class name to generate |
| string | $fileName | File name to write the class to |
| array | $options | Options for the migration class |
| string | $up | The code for the up function |
| string | $down | The code for the down function |
Definition at line 527 of file Builder.php.
| Doctrine_Migration_Builder::buildRemoveColumn | ( | $tableName, | |
| $columnName, | |||
| $column | |||
| ) |
Build the code for removing columns
| string | $tableName | |
| string | $columnName | |
| string | $column |
Definition at line 427 of file Builder.php.
| Doctrine_Migration_Builder::buildRemoveIndex | ( | $tableName, | |
| $indexName, | |||
| $index | |||
| ) |
Build the code for removing indexes
| string | $tableName | |
| string | $indexName | |
| string | $index |
Definition at line 469 of file Builder.php.
| Doctrine_Migration_Builder::generateMigrationClass | ( | $className, | |
$options = array(), |
|||
$up = null, |
|||
$down = null, |
|||
$return = false |
|||
| ) |
Generate a migration class
| string | $className | Class name to generate |
| array | $options | Options for the migration class |
| string | $up | The code for the up function |
| string | $down | The code for the down function |
| boolean | $return | Whether or not to return the code. If true return and false it writes the class to disk. |
Definition at line 485 of file Builder.php.
| Doctrine_Migration_Builder::generateMigrationsFromDb | ( | ) |
Generate a set of migration classes from the existing databases
Definition at line 268 of file Builder.php.
| Doctrine_Migration_Builder::generateMigrationsFromDiff | ( | Doctrine_Migration_Diff | $diff | ) |
Generate migrations from a Doctrine_Migration_Diff instance
| Doctrine_Migration_Diff | $diff | Instance to generate changes from |
Definition at line 143 of file Builder.php.
| Doctrine_Migration_Builder::generateMigrationsFromModels | ( | $modelsPath = null, |
|
$modelLoading = null |
|||
| ) |
Generate a set of migrations from a set of models
| string | $modelsPath | Path to models |
| string | $modelLoading | What type of model loading to use when loading the models |
Definition at line 288 of file Builder.php.
| Doctrine_Migration_Builder::getMigrationsPath | ( | ) |
Get the path where generated migration classes are written to
Definition at line 104 of file Builder.php.
|
protected |
Loads the class template used for generating classes
Definition at line 114 of file Builder.php.
| Doctrine_Migration_Builder::setMigrationsPath | ( | $path | ) |
Set the path to write the generated migration classes
| string | path the path where migration classes are stored and being generated |
Definition at line 92 of file Builder.php.
|
inherited |
Special function for var_export() The normal code which is returned is malformed and does not follow Doctrine standards So we do some string replacing to clean it up
| string | $var |
Definition at line 43 of file Builder.php.