fix: list_users now cascades delete when user is deleted

This commit is contained in:
2026-08-21 21:16:16 +02:00
parent be588dd405
commit a1ec7cc24a
@@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS lists (
CREATE TABLE IF NOT EXISTS list_users ( CREATE TABLE IF NOT EXISTS list_users (
list_id UUID REFERENCES lists(id) ON DELETE CASCADE, list_id UUID REFERENCES lists(id) ON DELETE CASCADE,
user_id UUID NOT NULL, user_id UUID REFERENCES users(id) ON DELETE CASCADE,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
PRIMARY KEY (list_id, user_id) PRIMARY KEY (list_id, user_id)
); );