score-the-pigs/resources/migrations/20250312151928-create-players.up.sql

10 lines
292 B
SQL

CREATE TABLE IF NOT EXISTS player (
id INTEGER PRIMARY KEY,
game_score INTEGER NOT NULL,
round_score INTEGER NOT NULL,
name text NOT NULL,
game_code text NOT NULL COLLATE NOCASE,
play_order integer NOT NULL,
last_move integer,
FOREIGN KEY (game_code) REFERENCES game(code)
);