From a1c0fe05649e0bbfa912edf8328a0ac8de381c17 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Mon, 14 Feb 2022 19:00:09 +0100 Subject: [PATCH] backports murph-skeleton --- migrations/Version20220205165823.php | 33 ------------------------- migrations/Version20220205172820.php | 31 ----------------------- migrations/Version20220206181024.php | 37 ---------------------------- 3 files changed, 101 deletions(-) delete mode 100644 migrations/Version20220205165823.php delete mode 100644 migrations/Version20220205172820.php delete mode 100644 migrations/Version20220206181024.php diff --git a/migrations/Version20220205165823.php b/migrations/Version20220205165823.php deleted file mode 100644 index b6c3675..0000000 --- a/migrations/Version20220205165823.php +++ /dev/null @@ -1,33 +0,0 @@ -addSql('CREATE TABLE post_follow (id INT AUTO_INCREMENT NOT NULL, post_id INT NOT NULL, comment_id INT NOT NULL, hash VARCHAR(255) NOT NULL, is_enabled TINYINT(1) NOT NULL, INDEX IDX_5816A0154B89032C (post_id), INDEX IDX_5816A015F8697D13 (comment_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); - $this->addSql('ALTER TABLE post_follow ADD CONSTRAINT FK_5816A0154B89032C FOREIGN KEY (post_id) REFERENCES post (id)'); - $this->addSql('ALTER TABLE post_follow ADD CONSTRAINT FK_5816A015F8697D13 FOREIGN KEY (comment_id) REFERENCES comment (id)'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('DROP TABLE post_follow'); - } -} diff --git a/migrations/Version20220205172820.php b/migrations/Version20220205172820.php deleted file mode 100644 index d01c1f3..0000000 --- a/migrations/Version20220205172820.php +++ /dev/null @@ -1,31 +0,0 @@ -addSql('ALTER TABLE post_follow ADD created_at DATETIME NOT NULL, ADD updated_at DATETIME NOT NULL'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE post_follow DROP created_at, DROP updated_at'); - } -} diff --git a/migrations/Version20220206181024.php b/migrations/Version20220206181024.php deleted file mode 100644 index 98e63de..0000000 --- a/migrations/Version20220206181024.php +++ /dev/null @@ -1,37 +0,0 @@ -addSql('ALTER TABLE post_follow DROP FOREIGN KEY FK_5816A015F8697D13'); - $this->addSql('ALTER TABLE post_follow DROP FOREIGN KEY FK_5816A0154B89032C'); - $this->addSql('ALTER TABLE post_follow ADD CONSTRAINT FK_5816A015F8697D13 FOREIGN KEY (comment_id) REFERENCES comment (id) ON DELETE CASCADE'); - $this->addSql('ALTER TABLE post_follow ADD CONSTRAINT FK_5816A0154B89032C FOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE post_follow DROP FOREIGN KEY FK_5816A0154B89032C'); - $this->addSql('ALTER TABLE post_follow DROP FOREIGN KEY FK_5816A015F8697D13'); - $this->addSql('ALTER TABLE post_follow ADD CONSTRAINT FK_5816A0154B89032C FOREIGN KEY (post_id) REFERENCES post (id)'); - $this->addSql('ALTER TABLE post_follow ADD CONSTRAINT FK_5816A015F8697D13 FOREIGN KEY (comment_id) REFERENCES comment (id)'); - } -}