From 76b4a434d604a99be7f1b717f9e0092eb7bbf4de Mon Sep 17 00:00:00 2001 From: Katja Glass Date: Tue, 28 May 2024 16:47:51 +0200 Subject: [PATCH] include migration --- Migrations/Version20240828161654.php | 45 ++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Migrations/Version20240828161654.php diff --git a/Migrations/Version20240828161654.php b/Migrations/Version20240828161654.php new file mode 100644 index 0000000..f3b1b2b --- /dev/null +++ b/Migrations/Version20240828161654.php @@ -0,0 +1,45 @@ +addSql('ALTER TABLE kimai2_ext_approval_history DROP FOREIGN KEY FK_A8341CE3FE65F000'); + $this->addSql('ALTER TABLE kimai2_ext_approval_history DROP FOREIGN KEY FK_A8341CE36BF700BD'); + + $this->addSql('ALTER TABLE kimai2_ext_approval_history ADD CONSTRAINT FK_A9341CE3FE65F000 FOREIGN KEY (approval_id) REFERENCES kimai2_ext_approval (id) ON DELETE CASCADE'); + $this->addSql('ALTER TABLE kimai2_ext_approval_history ADD CONSTRAINT FK_A9341CE36BF700BD FOREIGN KEY (status_id) REFERENCES kimai2_ext_approval_status (id) ON DELETE CASCADE'); + } + + + public function down(Schema $schema): void + { + $this->addSql('ALTER TABLE kimai2_ext_approval_history DROP FOREIGN KEY FK_A9341CE3FE65F000'); + $this->addSql('ALTER TABLE kimai2_ext_approval_history DROP FOREIGN KEY FK_A9341CE36BF700BD'); + + $this->addSql('ALTER TABLE kimai2_ext_approval_history ADD CONSTRAINT FK_A8341CE3FE65F000 FOREIGN KEY (approval_id) REFERENCES kimai2_ext_approval (id)'); + $this->addSql('ALTER TABLE kimai2_ext_approval_history ADD CONSTRAINT FK_A8341CE36BF700BD FOREIGN KEY (status_id) REFERENCES kimai2_ext_approval_status (id)'); + } +}