|
@@ 734-738 (lines=5) @@
|
| 731 |
|
protected function getRenameColumnInstructions($tableName, $columnName, $newColumnName) |
| 732 |
|
{ |
| 733 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 734 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 735 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 736 |
|
|
| 737 |
|
return $newState + $state; |
| 738 |
|
}); |
| 739 |
|
|
| 740 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 741 |
|
$sql = str_replace( |
|
@@ 762-766 (lines=5) @@
|
| 759 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 760 |
|
|
| 761 |
|
$newColumnName = $newColumn->getName(); |
| 762 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 763 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 764 |
|
|
| 765 |
|
return $newState + $state; |
| 766 |
|
}); |
| 767 |
|
|
| 768 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumn) { |
| 769 |
|
$sql = preg_replace( |
|
@@ 790-794 (lines=5) @@
|
| 787 |
|
{ |
| 788 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 789 |
|
|
| 790 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 791 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, false); |
| 792 |
|
|
| 793 |
|
return $newState + $state; |
| 794 |
|
}); |
| 795 |
|
|
| 796 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 797 |
|
$sql = preg_replace( |