|
@@ 571-575 (lines=5) @@
|
| 568 |
|
protected function getRenameColumnInstructions($tableName, $columnName, $newColumnName) |
| 569 |
|
{ |
| 570 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 571 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 572 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 573 |
|
|
| 574 |
|
return $newState + $state; |
| 575 |
|
}); |
| 576 |
|
|
| 577 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 578 |
|
$sql = str_replace( |
|
@@ 599-603 (lines=5) @@
|
| 596 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 597 |
|
|
| 598 |
|
$newColumnName = $newColumn->getName(); |
| 599 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 600 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 601 |
|
|
| 602 |
|
return $newState + $state; |
| 603 |
|
}); |
| 604 |
|
|
| 605 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumn) { |
| 606 |
|
$sql = preg_replace( |
|
@@ 627-631 (lines=5) @@
|
| 624 |
|
{ |
| 625 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 626 |
|
|
| 627 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 628 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, false); |
| 629 |
|
|
| 630 |
|
return $newState + $state; |
| 631 |
|
}); |
| 632 |
|
|
| 633 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 634 |
|
$sql = preg_replace( |