|
@@ 577-581 (lines=5) @@
|
| 574 |
|
protected function getRenameColumnInstructions($tableName, $columnName, $newColumnName) |
| 575 |
|
{ |
| 576 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 577 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 578 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 579 |
|
|
| 580 |
|
return $newState + $state; |
| 581 |
|
}); |
| 582 |
|
|
| 583 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 584 |
|
$sql = str_replace( |
|
@@ 605-609 (lines=5) @@
|
| 602 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 603 |
|
|
| 604 |
|
$newColumnName = $newColumn->getName(); |
| 605 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 606 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 607 |
|
|
| 608 |
|
return $newState + $state; |
| 609 |
|
}); |
| 610 |
|
|
| 611 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumn) { |
| 612 |
|
$sql = preg_replace( |
|
@@ 633-637 (lines=5) @@
|
| 630 |
|
{ |
| 631 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 632 |
|
|
| 633 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 634 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, false); |
| 635 |
|
|
| 636 |
|
return $newState + $state; |
| 637 |
|
}); |
| 638 |
|
|
| 639 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 640 |
|
$sql = preg_replace( |