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