From 2e370cbb88812a037eed0a74e5caf7a501a18e65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Wed, 9 Oct 2024 17:46:34 +0200 Subject: [PATCH] DB: cascade delete of deck on seed deletion --- src/hanabi/database/games_seeds_schema.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hanabi/database/games_seeds_schema.sql b/src/hanabi/database/games_seeds_schema.sql index 35592ee..8cdac2b 100644 --- a/src/hanabi/database/games_seeds_schema.sql +++ b/src/hanabi/database/games_seeds_schema.sql @@ -20,7 +20,7 @@ CREATE INDEX seeds_variant_idx ON seeds (variant_id); DROP TABLE IF EXISTS decks CASCADE; CREATE TABLE decks ( - seed TEXT REFERENCES seeds (seed), + seed TEXT REFERENCES seeds (seed) ON DELETE CASCADE, /* Order of card in deck*/ deck_index SMALLINT NOT NULL, /* Suit */