|
@@ 784-788 (lines=5) @@
|
| 781 |
|
protected function getRenameColumnInstructions($tableName, $columnName, $newColumnName) |
| 782 |
|
{ |
| 783 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 784 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 785 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 786 |
|
|
| 787 |
|
return $newState + $state; |
| 788 |
|
}); |
| 789 |
|
|
| 790 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 791 |
|
$sql = str_replace( |
|
@@ 812-816 (lines=5) @@
|
| 809 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 810 |
|
|
| 811 |
|
$newColumnName = $newColumn->getName(); |
| 812 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 813 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 814 |
|
|
| 815 |
|
return $newState + $state; |
| 816 |
|
}); |
| 817 |
|
|
| 818 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumn) { |
| 819 |
|
$sql = preg_replace( |
|
@@ 840-844 (lines=5) @@
|
| 837 |
|
{ |
| 838 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 839 |
|
|
| 840 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 841 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, false); |
| 842 |
|
|
| 843 |
|
return $newState + $state; |
| 844 |
|
}); |
| 845 |
|
|
| 846 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 847 |
|
$sql = preg_replace( |