|
@@ 642-646 (lines=5) @@
|
| 639 |
|
protected function getRenameColumnInstructions($tableName, $columnName, $newColumnName) |
| 640 |
|
{ |
| 641 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 642 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 643 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 644 |
|
|
| 645 |
|
return $newState + $state; |
| 646 |
|
}); |
| 647 |
|
|
| 648 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 649 |
|
$sql = str_replace( |
|
@@ 670-674 (lines=5) @@
|
| 667 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 668 |
|
|
| 669 |
|
$newColumnName = $newColumn->getName(); |
| 670 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 671 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 672 |
|
|
| 673 |
|
return $newState + $state; |
| 674 |
|
}); |
| 675 |
|
|
| 676 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumn) { |
| 677 |
|
$sql = preg_replace( |
|
@@ 698-702 (lines=5) @@
|
| 695 |
|
{ |
| 696 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 697 |
|
|
| 698 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 699 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, false); |
| 700 |
|
|
| 701 |
|
return $newState + $state; |
| 702 |
|
}); |
| 703 |
|
|
| 704 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 705 |
|
$sql = preg_replace( |