From 444476c685eb83efac4d77f96312960b2ba97a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sat, 12 Oct 2024 14:46:42 +0200 Subject: [PATCH] add infeasibility table to DB --- src/hanabi/database/games_seeds_schema.sql | 24 ++++++++-------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/src/hanabi/database/games_seeds_schema.sql b/src/hanabi/database/games_seeds_schema.sql index 2089904..4c90b3c 100644 --- a/src/hanabi/database/games_seeds_schema.sql +++ b/src/hanabi/database/games_seeds_schema.sql @@ -168,20 +168,14 @@ CREATE TABLE certificate_game_actions ( PRIMARY KEY (game_id, turn) ); - -DROP TABLE IF EXISTS score_upper_bounds; -CREATE TABLE score_upper_bounds ( - seed TEXT NOT NULL REFERENCES seeds ON DELETE CASCADE, - score_upper_bound SMALLINT NOT NULL, +DROP TABLE IF EXISTS infeasibility_reasons; +CREATE TABLE infeasibility_reasons ( + seed TEXT NOT NULL REFERENCES seeds (seed) ON DELETE CASCADE, reason SMALLINT NOT NULL, - UNIQUE (seed, reason) -); - -DROP TABLE IF EXISTS score_lower_bounds; -CREATE TABLE score_lower_bounds ( - seed TEXT NOT NULL REFERENCES seeds ON DELETE CASCADE, - score_lower_bound SMALLINT NOT NULL, - game_id INT REFERENCES games ON DELETE CASCADE, - actions TEXT, - CHECK (num_nonnulls(game_id, actions) = 1) + /* + Some value whose meaning depends on the type of reason, for example index when pace loss occurs. + Can be null for some reason. + */ + value SMALLINT, + PRIMARY KEY (seed, reason) ); \ No newline at end of file