| @@ 506-515 (lines=10) @@ | ||
| 503 | || $action instanceof ChangePrimaryKey |
|
| 504 | || $action instanceof ChangeComment; |
|
| 505 | }) |
|
| 506 | ->each(function ($action) { |
|
| 507 | $table = $action->getTable(); |
|
| 508 | $name = $table->getName(); |
|
| 509 | ||
| 510 | if (!isset($this->tableMoves[$name])) { |
|
| 511 | $this->tableMoves[$name] = new AlterTable($table); |
|
| 512 | } |
|
| 513 | ||
| 514 | $this->tableMoves[$name]->addAction($action); |
|
| 515 | }); |
|
| 516 | } |
|
| 517 | ||
| 518 | /** |
|
| @@ 536-545 (lines=10) @@ | ||
| 533 | // so we don't wan't them here too |
|
| 534 | return isset($this->tableCreates[$action->getTable()->getName()]); |
|
| 535 | }) |
|
| 536 | ->each(function ($action) { |
|
| 537 | $table = $action->getTable(); |
|
| 538 | $name = $table->getName(); |
|
| 539 | ||
| 540 | if (!isset($this->indexes[$name])) { |
|
| 541 | $this->indexes[$name] = new AlterTable($table); |
|
| 542 | } |
|
| 543 | ||
| 544 | $this->indexes[$name]->addAction($action); |
|
| 545 | }); |
|
| 546 | } |
|
| 547 | ||
| 548 | /** |
|
| @@ 561-570 (lines=10) @@ | ||
| 558 | return $action instanceof AddForeignKey |
|
| 559 | || $action instanceof DropForeignKey; |
|
| 560 | }) |
|
| 561 | ->each(function ($action) { |
|
| 562 | $table = $action->getTable(); |
|
| 563 | $name = $table->getName(); |
|
| 564 | ||
| 565 | if (!isset($this->constraints[$name])) { |
|
| 566 | $this->constraints[$name] = new AlterTable($table); |
|
| 567 | } |
|
| 568 | ||
| 569 | $this->constraints[$name]->addAction($action); |
|
| 570 | }); |
|
| 571 | } |
|
| 572 | } |
|
| 573 | ||