From d7c2e638a5ea39caeadd40406f840e9b90f893d5 Mon Sep 17 00:00:00 2001
From: Syndamia <kamen@syndamia.com>
Date: Sun, 2 Feb 2025 15:04:59 +0200
Subject: feat(views/archive): Implement archive deletion

---
 migrations/00-initial.sql | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'migrations/00-initial.sql')

diff --git a/migrations/00-initial.sql b/migrations/00-initial.sql
index a4b999f..776331f 100644
--- a/migrations/00-initial.sql
+++ b/migrations/00-initial.sql
@@ -44,5 +44,7 @@ CREATE TABLE IF NOT EXISTS ArchiveListsWebpages (
     WID      INT NOT NULL,
     LID      INT NOT NULL,
     Position INT NOT NULL,
-    PRIMARY KEY (WID, LID)
+    PRIMARY KEY (WID, LID),
+    FOREIGN KEY (WID) REFERENCES Webpages(WID) ON DELETE CASCADE,
+    FOREIGN KEY (LID) REFERENCES ArchiveLists(LID) ON DELETE CASCADE
 );
-- 
cgit v1.2.3

