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