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