DB: cascade delete of deck on seed deletion

This commit is contained in:
Maximilian Keßler 2024-10-09 17:46:34 +02:00
parent 9c8d1940fe
commit 2e370cbb88

View file

@ -20,7 +20,7 @@ CREATE INDEX seeds_variant_idx ON seeds (variant_id);
DROP TABLE IF EXISTS decks CASCADE; DROP TABLE IF EXISTS decks CASCADE;
CREATE TABLE decks ( CREATE TABLE decks (
seed TEXT REFERENCES seeds (seed), seed TEXT REFERENCES seeds (seed) ON DELETE CASCADE,
/* Order of card in deck*/ /* Order of card in deck*/
deck_index SMALLINT NOT NULL, deck_index SMALLINT NOT NULL,
/* Suit */ /* Suit */