From 7bafa1ee5f1f5e4197b8818f98f58701876cf225 Mon Sep 17 00:00:00 2001 From: Minjoo Date: Mon, 4 Nov 2024 15:22:06 +0900 Subject: [PATCH] =?UTF-8?q?bug:=20=ED=94=8C=EB=9D=BC=EC=9D=B4=EC=9B=A8?= =?UTF-8?q?=EC=9D=B4=20=EC=99=B8=EB=9E=98=ED=82=A4=20=EC=A0=9C=EC=95=BD?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20init=20=EC=95=88=EB=90=98=EB=8A=94=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/resources/db/migration/V1__init.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/src/main/resources/db/migration/V1__init.sql b/backend/src/main/resources/db/migration/V1__init.sql index 06bf8c6c..6873150c 100644 --- a/backend/src/main/resources/db/migration/V1__init.sql +++ b/backend/src/main/resources/db/migration/V1__init.sql @@ -30,10 +30,12 @@ CREATE TABLE IF NOT EXISTS discussion ( CONSTRAINT fk_mission FOREIGN KEY (mission_id) REFERENCES mission(id) ); +SET FOREIGN_KEY_CHECKS = 0; ALTER TABLE discussion DROP FOREIGN KEY fk_member; ALTER TABLE discussion DROP FOREIGN KEY fk_mission; ALTER TABLE discussion ADD CONSTRAINT fk_discussion_member FOREIGN KEY (member_id) REFERENCES member(id); ALTER TABLE discussion ADD CONSTRAINT fk_discussion_mission FOREIGN KEY (mission_id) REFERENCES mission(id); +SET FOREIGN_KEY_CHECKS = 1; CREATE TABLE discussion_comment ( id BIGINT AUTO_INCREMENT,