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