|
@@ 752-756 (lines=5) @@
|
| 749 |
|
protected function getRenameColumnInstructions($tableName, $columnName, $newColumnName) |
| 750 |
|
{ |
| 751 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 752 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 753 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 754 |
|
|
| 755 |
|
return $newState + $state; |
| 756 |
|
}); |
| 757 |
|
|
| 758 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 759 |
|
$sql = str_replace( |
|
@@ 780-784 (lines=5) @@
|
| 777 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 778 |
|
|
| 779 |
|
$newColumnName = $newColumn->getName(); |
| 780 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 781 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 782 |
|
|
| 783 |
|
return $newState + $state; |
| 784 |
|
}); |
| 785 |
|
|
| 786 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumn) { |
| 787 |
|
$sql = preg_replace( |
|
@@ 808-812 (lines=5) @@
|
| 805 |
|
{ |
| 806 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 807 |
|
|
| 808 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 809 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, false); |
| 810 |
|
|
| 811 |
|
return $newState + $state; |
| 812 |
|
}); |
| 813 |
|
|
| 814 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 815 |
|
$sql = preg_replace( |