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