Skip to content

Commit

Permalink
Merge pull request #638 from tukcomCD2024/fix/group_invite_index-B-co…
Browse files Browse the repository at this point in the history
…re-#637

fix : group_invite unique_index때문에 삭제 후 오류 발생 #637
  • Loading branch information
seokho-1116 authored Aug 17, 2024
2 parents 3c7a32d + 9c5a34c commit c588511
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit c588511

Please sign in to comment.