|
@@ 473-477 (lines=5) @@
|
| 470 |
|
protected function getRenameColumnInstructions($tableName, $columnName, $newColumnName) |
| 471 |
|
{ |
| 472 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 473 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 474 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 475 |
|
|
| 476 |
|
return $newState + $state; |
| 477 |
|
}); |
| 478 |
|
|
| 479 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 480 |
|
$sql = str_replace( |
|
@@ 501-505 (lines=5) @@
|
| 498 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 499 |
|
|
| 500 |
|
$newColumnName = $newColumn->getName(); |
| 501 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumnName) { |
| 502 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, $newColumnName); |
| 503 |
|
|
| 504 |
|
return $newState + $state; |
| 505 |
|
}); |
| 506 |
|
|
| 507 |
|
$instructions->addPostStep(function ($state) use ($columnName, $newColumn) { |
| 508 |
|
$sql = preg_replace( |
|
@@ 529-533 (lines=5) @@
|
| 526 |
|
{ |
| 527 |
|
$instructions = $this->beginAlterByCopyTable($tableName); |
| 528 |
|
|
| 529 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 530 |
|
$newState = $this->calculateNewTableColumns($state['tmpTableName'], $columnName, false); |
| 531 |
|
|
| 532 |
|
return $newState + $state; |
| 533 |
|
}); |
| 534 |
|
|
| 535 |
|
$instructions->addPostStep(function ($state) use ($columnName) { |
| 536 |
|
$sql = preg_replace( |