Skip to content

Commit

Permalink
fix: 좋아요가 있는 게시글 삭제 가능하도록 ON DELETE CASCADE 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
Sehee-Lee-01 committed Jan 18, 2024
1 parent e9d8d53 commit b24afea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mysql/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ CREATE TABLE likes

CONSTRAINT posts_pk PRIMARY KEY (id),
FOREIGN KEY (user_id) REFERENCES users (id),
FOREIGN KEY (post_id) REFERENCES posts (id)
FOREIGN KEY (post_id) REFERENCES posts (id) ON DELETE CASCADE
);

0 comments on commit b24afea

Please sign in to comment.