DB: cascade delete of deck on seed deletion
This commit is contained in:
parent
9c8d1940fe
commit
2e370cbb88
1 changed files with 1 additions and 1 deletions
|
@ -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 */
|
||||||
|
|
Loading…
Reference in a new issue