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