|
@@ 600-604 (lines=5) @@
|
| 597 |
|
protected function getRenameColumnInstructions($tableName, $columnName, $newColumnName) |
| 598 |
|
{ |
| 599 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 600 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 601 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 602 |
|
|
| 603 |
|
return $newState + $state; |
| 604 |
|
}); |
| 605 |
|
|
| 606 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 607 |
|
$sql = str_replace( |
|
@@ 628-632 (lines=5) @@
|
| 625 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 626 |
|
|
| 627 |
|
$newColumnName = $newColumn->getName(); |
| 628 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 629 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 630 |
|
|
| 631 |
|
return $newState + $state; |
| 632 |
|
}); |
| 633 |
|
|
| 634 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumn) { |
| 635 |
|
$sql = preg_replace( |
|
@@ 656-660 (lines=5) @@
|
| 653 |
|
{ |
| 654 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 655 |
|
|
| 656 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 657 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, false); |
| 658 |
|
|
| 659 |
|
return $newState + $state; |
| 660 |
|
}); |
| 661 |
|
|
| 662 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 663 |
|
$sql = preg_replace( |