From 9c5a34c6dfe3e40d3a47e840a15bbc3d9ece66a8 Mon Sep 17 00:00:00 2001 From: hong seokho Date: Thu, 15 Aug 2024 11:08:32 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20group=5Finvite=20unique=20index=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../V35__drop_unique_group_invite.sql | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 backend/core/src/main/resources/db/migration/V35__drop_unique_group_invite.sql diff --git a/backend/core/src/main/resources/db/migration/V35__drop_unique_group_invite.sql b/backend/core/src/main/resources/db/migration/V35__drop_unique_group_invite.sql new file mode 100644 index 00000000..b9694876 --- /dev/null +++ b/backend/core/src/main/resources/db/migration/V35__drop_unique_group_invite.sql @@ -0,0 +1,22 @@ +-- 외래 키 제약 조건 삭제 +ALTER TABLE group_invite + DROP CONSTRAINT fk_group_invite_group_id; + +ALTER TABLE group_invite + DROP CONSTRAINT fk_group_invite_group_owner_id; + +ALTER TABLE group_invite + DROP CONSTRAINT fk_group_invite_group_member_id; + +-- 유니크 키 삭제 +ALTER TABLE group_invite DROP KEY unique_group_invite; + +-- 외래 키 제약 조건 추가 +ALTER TABLE group_invite + ADD CONSTRAINT fk_group_invite_group_id FOREIGN KEY (group_id) REFERENCES `group` (group_id); + +ALTER TABLE group_invite + ADD CONSTRAINT fk_group_invite_group_owner_id FOREIGN KEY (group_owner_id) REFERENCES member (member_id); + +ALTER TABLE group_invite + ADD CONSTRAINT fk_group_invite_group_member_id FOREIGN KEY (group_member_id) REFERENCES member (member_id); \ No newline at end of file