From b24afea3a64b7c846c00d282d28337984749d05c Mon Sep 17 00:00:00 2001 From: Sehee-Lee-01 Date: Thu, 18 Jan 2024 13:14:20 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=A2=8B=EC=95=84=EC=9A=94=EA=B0=80=20?= =?UTF-8?q?=EC=9E=88=EB=8A=94=20=EA=B2=8C=EC=8B=9C=EA=B8=80=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C=20=EA=B0=80=EB=8A=A5=ED=95=98=EB=8F=84=EB=A1=9D=20ON?= =?UTF-8?q?=20DELETE=20CASCADE=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mysql/schema.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql/schema.sql b/mysql/schema.sql index 35e9beee..bb422a2e 100644 --- a/mysql/schema.sql +++ b/mysql/schema.sql @@ -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 );