Skip to content

Commit

Permalink
bug: 플라이웨이 외래키 제약으로 init 안되는 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Minjoo522 committed Nov 4, 2024
1 parent 449a7d1 commit 7bafa1e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/src/main/resources/db/migration/V1__init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7bafa1e

Please sign in to comment.