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