| @@ 498-507 (lines=10) @@ | ||
| 495 | || $action instanceof ChangePrimaryKey |
|
| 496 | || $action instanceof ChangeComment; |
|
| 497 | }) |
|
| 498 | ->each(function ($action) { |
|
| 499 | $table = $action->getTable(); |
|
| 500 | $name = $table->getName(); |
|
| 501 | ||
| 502 | if (!isset($this->tableMoves[$name])) { |
|
| 503 | $this->tableMoves[$name] = new AlterTable($table); |
|
| 504 | } |
|
| 505 | ||
| 506 | $this->tableMoves[$name]->addAction($action); |
|
| 507 | }); |
|
| 508 | } |
|
| 509 | ||
| 510 | /** |
|
| @@ 528-537 (lines=10) @@ | ||
| 525 | // so we don't wan't them here too |
|
| 526 | return isset($this->tableCreates[$action->getTable()->getName()]); |
|
| 527 | }) |
|
| 528 | ->each(function ($action) { |
|
| 529 | $table = $action->getTable(); |
|
| 530 | $name = $table->getName(); |
|
| 531 | ||
| 532 | if (!isset($this->indexes[$name])) { |
|
| 533 | $this->indexes[$name] = new AlterTable($table); |
|
| 534 | } |
|
| 535 | ||
| 536 | $this->indexes[$name]->addAction($action); |
|
| 537 | }); |
|
| 538 | } |
|
| 539 | ||
| 540 | /** |
|
| @@ 553-562 (lines=10) @@ | ||
| 550 | return $action instanceof AddForeignKey |
|
| 551 | || $action instanceof DropForeignKey; |
|
| 552 | }) |
|
| 553 | ->each(function ($action) { |
|
| 554 | $table = $action->getTable(); |
|
| 555 | $name = $table->getName(); |
|
| 556 | ||
| 557 | if (!isset($this->constraints[$name])) { |
|
| 558 | $this->constraints[$name] = new AlterTable($table); |
|
| 559 | } |
|
| 560 | ||
| 561 | $this->constraints[$name]->addAction($action); |
|
| 562 | }); |
|
| 563 | } |
|
| 564 | } |
|
| 565 | ||