|
@@ 493-497 (lines=5) @@
|
| 490 |
|
protected function getRenameColumnInstructions($tableName, $columnName, $newColumnName) |
| 491 |
|
{ |
| 492 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 493 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 494 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 495 |
|
|
| 496 |
|
return $newState + $state; |
| 497 |
|
}); |
| 498 |
|
|
| 499 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 500 |
|
$sql = str_replace( |
|
@@ 521-525 (lines=5) @@
|
| 518 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 519 |
|
|
| 520 |
|
$newColumnName = $newColumn->getName(); |
| 521 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 522 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 523 |
|
|
| 524 |
|
return $newState + $state; |
| 525 |
|
}); |
| 526 |
|
|
| 527 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumn) { |
| 528 |
|
$sql = preg_replace( |
|
@@ 549-553 (lines=5) @@
|
| 546 |
|
{ |
| 547 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 548 |
|
|
| 549 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 550 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, false); |
| 551 |
|
|
| 552 |
|
return $newState + $state; |
| 553 |
|
}); |
| 554 |
|
|
| 555 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 556 |
|
$sql = preg_replace( |