|
@@ 534-538 (lines=5) @@
|
| 531 |
|
protected function getRenameColumnInstructions($tableName, $columnName, $newColumnName) |
| 532 |
|
{ |
| 533 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 534 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 535 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 536 |
|
|
| 537 |
|
return $newState + $state; |
| 538 |
|
}); |
| 539 |
|
|
| 540 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 541 |
|
$sql = str_replace( |
|
@@ 562-566 (lines=5) @@
|
| 559 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 560 |
|
|
| 561 |
|
$newColumnName = $newColumn->getName(); |
| 562 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 563 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 564 |
|
|
| 565 |
|
return $newState + $state; |
| 566 |
|
}); |
| 567 |
|
|
| 568 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumn) { |
| 569 |
|
$sql = preg_replace( |
|
@@ 590-594 (lines=5) @@
|
| 587 |
|
{ |
| 588 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 589 |
|
|
| 590 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 591 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, false); |
| 592 |
|
|
| 593 |
|
return $newState + $state; |
| 594 |
|
}); |
| 595 |
|
|
| 596 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 597 |
|
$sql = preg_replace( |