fix database schema: add number of players
This commit is contained in:
parent
38b9db5b8f
commit
cc8dd2a90c
1 changed files with 6 additions and 2 deletions
|
@ -244,8 +244,11 @@ CREATE TABLE seeds (
|
||||||
*/
|
*/
|
||||||
DROP TABLE IF EXISTS variant_base_ratings CASCADE;
|
DROP TABLE IF EXISTS variant_base_ratings CASCADE;
|
||||||
CREATE TABLE variant_base_ratings (
|
CREATE TABLE variant_base_ratings (
|
||||||
variant_id SMALLINT PRIMARY KEY,
|
/* Note that a variant already includes the number of suits, so we do not have to add this here. */
|
||||||
rating REAL NOT NULL
|
variant_id SMALLINT,
|
||||||
|
player_count SMALLINT NOT NULL
|
||||||
|
rating REAL NOT NULL,
|
||||||
|
PRIMARY KEY (variant_id, player_count)
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -257,6 +260,7 @@ CREATE TABLE variant_ratings (
|
||||||
league_id INTEGER PRIMARY KEY REFERENCES games,
|
league_id INTEGER PRIMARY KEY REFERENCES games,
|
||||||
|
|
||||||
variant_id SMALLINT NOT NULL,
|
variant_id SMALLINT NOT NULL,
|
||||||
|
player_count SMALLINT NOT NULL,
|
||||||
change REAL NOT NULL,
|
change REAL NOT NULL,
|
||||||
value_after REAL NOT NULL,
|
value_after REAL NOT NULL,
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue