|
@@ 581-585 (lines=5) @@
|
| 578 |
|
protected function getRenameColumnInstructions($tableName, $columnName, $newColumnName) |
| 579 |
|
{ |
| 580 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 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, $newColumnName) { |
| 588 |
|
$sql = str_replace( |
|
@@ 609-613 (lines=5) @@
|
| 606 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 607 |
|
|
| 608 |
|
$newColumnName = $newColumn->getName(); |
| 609 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 610 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 611 |
|
|
| 612 |
|
return $newState + $state; |
| 613 |
|
}); |
| 614 |
|
|
| 615 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumn) { |
| 616 |
|
$sql = preg_replace( |
|
@@ 637-641 (lines=5) @@
|
| 634 |
|
{ |
| 635 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 636 |
|
|
| 637 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 638 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, false); |
| 639 |
|
|
| 640 |
|
return $newState + $state; |
| 641 |
|
}); |
| 642 |
|
|
| 643 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 644 |
|
$sql = preg_replace( |