Doctrine 1.2.4
Doctrine_Migration_Process Class Reference

Public Member Functions

 processChangedColumn (array $column)
 
 processCreatedColumn (array $column)
 
 processCreatedConstraint (array $constraint)
 
 processCreatedForeignKey (array $foreignKey)
 
 processCreatedIndex (array $index)
 
 processCreatedTable (array $table)
 
 processDroppedColumn (array $column)
 
 processDroppedConstraint (array $constraint)
 
 processDroppedForeignKey (array $foreignKey)
 
 processDroppedIndex (array $index)
 
 processDroppedTable (array $table)
 
 processRenamedColumn (array $column)
 
 processRenamedTable (array $table)
 

Detailed Description

Definition at line 33 of file Process.php.

Member Function Documentation

Doctrine_Migration_Process::processChangedColumn ( array  $column)

Process a changed column change

Parameters
array$columnChanged column definition
Returns
void

Definition at line 123 of file Process.php.

{
$options = array();
$options = $column['options'];
$options['type'] = $column['type'];
$this->getConnection()->export->alterTable($column['tableName'], array('change' => array($column['columnName'] => array('definition' => $options))));
}
Doctrine_Migration_Process::processCreatedColumn ( array  $column)

Process a created column change

Parameters
array$columnColumn definition
Returns
void

Definition at line 87 of file Process.php.

{
$this->getConnection()->export->alterTable($column['tableName'], array('add' => array($column['columnName'] => $column)));
}
Doctrine_Migration_Process::processCreatedConstraint ( array  $constraint)

Process a created constraint change

Parameters
array$constraintConstraint definition
Returns
void

Definition at line 160 of file Process.php.

{
$this->getConnection()->export->createConstraint($constraint['tableName'], $constraint['constraintName'], $constraint['definition']);
}
Doctrine_Migration_Process::processCreatedForeignKey ( array  $foreignKey)

Process a created foreign key change

Parameters
array$foreignKeyForeign key definition
Returns
void

Definition at line 182 of file Process.php.

{
$this->getConnection()->export->createForeignKey($foreignKey['tableName'], $foreignKey['definition']);
}
Doctrine_Migration_Process::processCreatedIndex ( array  $index)

Process a created index change

Parameters
array$indexIndex definition
Returns
void

Definition at line 138 of file Process.php.

{
$this->getConnection()->export->createIndex($index['tableName'], $index['indexName'], $index['definition']);
}
Doctrine_Migration_Process::processCreatedTable ( array  $table)

Process a created table change

Parameters
string$tableTable definition
Returns
void

Definition at line 54 of file Process.php.

{
$this->getConnection()->export->createTable($table['tableName'], $table['fields'], $table['options']);
}
Doctrine_Migration_Process::processDroppedColumn ( array  $column)

Process a dropped column change

Parameters
array$columnColumn definition
Returns
void

Definition at line 98 of file Process.php.

{
$this->getConnection()->export->alterTable($column['tableName'], array('remove' => array($column['columnName'] => array())));
}
Doctrine_Migration_Process::processDroppedConstraint ( array  $constraint)

Process a dropped constraint change

Parameters
array$constraintConstraint definition
Returns
void

Definition at line 171 of file Process.php.

{
$this->getConnection()->export->dropConstraint($constraint['tableName'], $constraint['constraintName'], isset($constraint['definition']['primary']) && $constraint['definition']['primary']);
}
Doctrine_Migration_Process::processDroppedForeignKey ( array  $foreignKey)

Process a dropped foreign key change

Parameters
array$foreignKey
Returns
void

Definition at line 193 of file Process.php.

{
$this->getConnection()->export->dropForeignKey($foreignKey['tableName'], $foreignKey['definition']['name']);
}
Doctrine_Migration_Process::processDroppedIndex ( array  $index)

Process a dropped index change

Parameters
array$indexIndex definition
Returns
void

Definition at line 149 of file Process.php.

{
$this->getConnection()->export->dropIndex($index['tableName'], $index['indexName']);
}
Doctrine_Migration_Process::processDroppedTable ( array  $table)

Process a dropped table change

Parameters
array$tableTable definition
Returns
void

Definition at line 65 of file Process.php.

{
$this->getConnection()->export->dropTable($table['tableName']);
}
Doctrine_Migration_Process::processRenamedColumn ( array  $column)

Process a renamed column change

Parameters
array$columnColumn definition
Returns
void

Definition at line 109 of file Process.php.

{
$columnList = $this->getConnection()->import->listTableColumns($column['tableName']);
if (isset($columnList[$column['oldColumnName']])) {
$this->getConnection()->export->alterTable($column['tableName'], array('rename' => array($column['oldColumnName'] => array('name' => $column['newColumnName'], 'definition' => $columnList[$column['oldColumnName']]))));
}
}
Doctrine_Migration_Process::processRenamedTable ( array  $table)

Process a renamed table change

Parameters
array$tableRenamed table definition
Returns
void

Definition at line 76 of file Process.php.

{
$this->getConnection()->export->alterTable($table['oldTableName'], array('name' => $table['newTableName']));
}

The documentation for this class was generated from the following file: