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