|
@@ 813-817 (lines=5) @@
|
| 810 |
|
protected function getRenameColumnInstructions($tableName, $columnName, $newColumnName) |
| 811 |
|
{ |
| 812 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 813 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 814 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 815 |
|
|
| 816 |
|
return $newState + $state; |
| 817 |
|
}); |
| 818 |
|
|
| 819 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 820 |
|
$sql = str_replace( |
|
@@ 841-845 (lines=5) @@
|
| 838 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 839 |
|
|
| 840 |
|
$newColumnName = $newColumn->getName(); |
| 841 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 842 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 843 |
|
|
| 844 |
|
return $newState + $state; |
| 845 |
|
}); |
| 846 |
|
|
| 847 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumn) { |
| 848 |
|
$sql = preg_replace( |
|
@@ 869-873 (lines=5) @@
|
| 866 |
|
{ |
| 867 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 868 |
|
|
| 869 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 870 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, false); |
| 871 |
|
|
| 872 |
|
return $newState + $state; |
| 873 |
|
}); |
| 874 |
|
|
| 875 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 876 |
|
$sql = preg_replace( |