Fix: test; limit changes on player update
This commit is contained in:
@ -38,11 +38,12 @@ CREATE TABLE word_cards (
|
||||
);
|
||||
|
||||
CREATE TABLE card_marks (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
card_id INTEGER NOT NULL,
|
||||
username TEXT NOT NULL,
|
||||
active BOOLEAN NOT NULL DEFAULT TRUE,
|
||||
FOREIGN KEY (card_id) REFERENCES word_cards(id) ON DELETE CASCADE
|
||||
FOREIGN KEY (card_id) REFERENCES word_cards(id) ON DELETE CASCADE,
|
||||
FOREIGN KEY (username) REFERENCES players(username) ON DELETE CASCADE,
|
||||
PRIMARY KEY (card_id, username)
|
||||
);
|
||||
|
||||
CREATE TABLE actions (
|
||||
@ -75,4 +76,4 @@ CREATE TABLE sessions(
|
||||
token_key TEXT NOT NULL DEFAULT '' UNIQUE, -- encoded value
|
||||
username TEXT NOT NULL,
|
||||
FOREIGN KEY (username) REFERENCES players(username) ON DELETE CASCADE
|
||||
);
|
||||
);
|
||||
|
Reference in New Issue
Block a user