fix database schema: add number of players

This commit is contained in:
Maximilian Keßler 2023-11-22 17:12:45 +01:00
parent 38b9db5b8f
commit cc8dd2a90c
Signed by: max
GPG Key ID: BCC5A619923C0BA5

View File

@ -244,8 +244,11 @@ CREATE TABLE seeds (
*/
DROP TABLE IF EXISTS variant_base_ratings CASCADE;
CREATE TABLE variant_base_ratings (
variant_id SMALLINT PRIMARY KEY,
rating REAL NOT NULL
/* Note that a variant already includes the number of suits, so we do not have to add this here. */
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,
variant_id SMALLINT NOT NULL,
player_count SMALLINT NOT NULL,
change REAL NOT NULL,
value_after REAL NOT NULL,