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