|
@@ 796-800 (lines=5) @@
|
| 793 |
|
protected function getRenameColumnInstructions($tableName, $columnName, $newColumnName) |
| 794 |
|
{ |
| 795 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 796 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 797 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 798 |
|
|
| 799 |
|
return $newState + $state; |
| 800 |
|
}); |
| 801 |
|
|
| 802 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 803 |
|
$sql = str_replace( |
|
@@ 824-828 (lines=5) @@
|
| 821 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 822 |
|
|
| 823 |
|
$newColumnName = $newColumn->getName(); |
| 824 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 825 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 826 |
|
|
| 827 |
|
return $newState + $state; |
| 828 |
|
}); |
| 829 |
|
|
| 830 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumn) { |
| 831 |
|
$sql = preg_replace( |
|
@@ 852-856 (lines=5) @@
|
| 849 |
|
{ |
| 850 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 851 |
|
|
| 852 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 853 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, false); |
| 854 |
|
|
| 855 |
|
return $newState + $state; |
| 856 |
|
}); |
| 857 |
|
|
| 858 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 859 |
|
$sql = preg_replace( |