|
@@ 662-666 (lines=5) @@
|
| 659 |
|
protected function getRenameColumnInstructions($tableName, $columnName, $newColumnName) |
| 660 |
|
{ |
| 661 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 662 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 663 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 664 |
|
|
| 665 |
|
return $newState + $state; |
| 666 |
|
}); |
| 667 |
|
|
| 668 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 669 |
|
$sql = str_replace( |
|
@@ 690-694 (lines=5) @@
|
| 687 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 688 |
|
|
| 689 |
|
$newColumnName = $newColumn->getName(); |
| 690 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 691 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 692 |
|
|
| 693 |
|
return $newState + $state; |
| 694 |
|
}); |
| 695 |
|
|
| 696 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumn) { |
| 697 |
|
$sql = preg_replace( |
|
@@ 718-722 (lines=5) @@
|
| 715 |
|
{ |
| 716 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 717 |
|
|
| 718 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 719 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, false); |
| 720 |
|
|
| 721 |
|
return $newState + $state; |
| 722 |
|
}); |
| 723 |
|
|
| 724 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 725 |
|
$sql = preg_replace( |