Skip to content

Commit

Permalink
Merge pull request #77 from backendoori/fix-post-delete
Browse files Browse the repository at this point in the history
🔨  좋아요가 있는 게시글 삭제 가능하도록 ON DELETE CASCADE 설정
  • Loading branch information
Sehee-Lee-01 authored Jan 18, 2024
2 parents e9d8d53 + b24afea commit 4d90b3f
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 4d90b3f

Please sign in to comment.