| Total Complexity | 3 |
| Total Lines | 19 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | final class Version20201126220805 extends AbstractMigration |
||
| 14 | { |
||
| 15 | public function getDescription() : string |
||
| 16 | { |
||
| 17 | return ''; |
||
| 18 | } |
||
| 19 | |||
| 20 | public function up(Schema $schema) : void |
||
| 21 | { |
||
| 22 | // this up() migration is auto-generated, please modify it to your needs |
||
| 23 | $this->addSql('CREATE TABLE wander_image (wander_id INT NOT NULL, image_id INT NOT NULL, INDEX IDX_69C7253A2F82EC6B (wander_id), INDEX IDX_69C7253A3DA5256D (image_id), PRIMARY KEY(wander_id, image_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); |
||
| 24 | $this->addSql('ALTER TABLE wander_image ADD CONSTRAINT FK_69C7253A2F82EC6B FOREIGN KEY (wander_id) REFERENCES wander (id) ON DELETE CASCADE'); |
||
| 25 | $this->addSql('ALTER TABLE wander_image ADD CONSTRAINT FK_69C7253A3DA5256D FOREIGN KEY (image_id) REFERENCES image (id) ON DELETE CASCADE'); |
||
| 26 | } |
||
| 27 | |||
| 28 | public function down(Schema $schema) : void |
||
| 32 | } |
||
| 33 | } |
||
| 34 |