change database schema: include winrate

This commit is contained in:
Maximilian Keßler 2024-01-20 13:32:06 +01:00
parent e6d24d7b7b
commit eb833db3ce
Signed by: max
GPG key ID: BCC5A619923C0BA5

View file

@ -381,6 +381,7 @@ CREATE TABLE endgames (
rank SMALLINT, /* 0 for clue actions */ rank SMALLINT, /* 0 for clue actions */
enumerator BIGINT NOT NULL CHECK (enumerator >= 0), enumerator BIGINT NOT NULL CHECK (enumerator >= 0),
denominator BIGINT NOT NULL CHECK (denominator > 0), denominator BIGINT NOT NULL CHECK (denominator > 0),
chance REAL GENERATED ALWAYS AS (CAST(enumerator AS REAL) / denominator) STORED,
PRIMARY KEY (game_id, turn, action_type, suit_index, rank) PRIMARY KEY (game_id, turn, action_type, suit_index, rank)
); );