|
@@ 554-558 (lines=5) @@
|
| 551 |
|
protected function getRenameColumnInstructions($tableName, $columnName, $newColumnName) |
| 552 |
|
{ |
| 553 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 554 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 555 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 556 |
|
|
| 557 |
|
return $newState + $state; |
| 558 |
|
}); |
| 559 |
|
|
| 560 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 561 |
|
$sql = str_replace( |
|
@@ 582-586 (lines=5) @@
|
| 579 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 580 |
|
|
| 581 |
|
$newColumnName = $newColumn->getName(); |
| 582 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 583 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 584 |
|
|
| 585 |
|
return $newState + $state; |
| 586 |
|
}); |
| 587 |
|
|
| 588 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumn) { |
| 589 |
|
$sql = preg_replace( |
|
@@ 610-614 (lines=5) @@
|
| 607 |
|
{ |
| 608 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 609 |
|
|
| 610 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 611 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, false); |
| 612 |
|
|
| 613 |
|
return $newState + $state; |
| 614 |
|
}); |
| 615 |
|
|
| 616 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 617 |
|
$sql = preg_replace( |