fixed processRenamedColumns() to work with mysql migrations
This commit is contained in:
parent
d0d026af05
commit
87d58d9964
@ -118,7 +118,12 @@ class Doctrine_Migration_Process
|
|||||||
foreach ($columns as $column) {
|
foreach ($columns as $column) {
|
||||||
$conn = $this->getConnection($column['tableName']);
|
$conn = $this->getConnection($column['tableName']);
|
||||||
|
|
||||||
$conn->export->alterTable($column['tableName'], array('rename' => array($column['oldColumnName'] => array('name' => $column['newColumnName']))));
|
$columnList = $conn->import->listTableColumns($column['tableName']);
|
||||||
|
if (isset($columnList[$column['oldColumnName']])) {
|
||||||
|
$conn->export->alterTable($column['tableName'],
|
||||||
|
array('rename' => array($column['oldColumnName'] => array('name' => $column['newColumnName'],
|
||||||
|
'definition'=>$columnList[$column['oldColumnName']]))));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user