From d1318d147297161691f5048e1f2cb4e516159144 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 14 Nov 2021 17:17:49 +0100 Subject: Add 'hidden' column to titles for beta-testing games. --- tools/sql/schema.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tools/sql/schema.txt') diff --git a/tools/sql/schema.txt b/tools/sql/schema.txt index 5e80ec6..dc2bcc6 100644 --- a/tools/sql/schema.txt +++ b/tools/sql/schema.txt @@ -4,7 +4,8 @@ CREATE TABLE IF NOT EXISTS blacklist_mail ( mail TEXT NOT NULL PRIMARY KEY ) WIT CREATE TABLE IF NOT EXISTS titles ( title_id TEXT NOT NULL PRIMARY KEY, title_name TEXT NOT NULL, - bgg INTEGER + bgg INTEGER, + hidden BOOLEAN ) WITHOUT ROWID; CREATE TABLE IF NOT EXISTS roles ( @@ -290,3 +291,12 @@ BEGIN DELETE FROM last_notified WHERE game_id = old.game_id; DELETE FROM players WHERE game_id = old.game_id; END; + +DROP VIEW IF EXISTS game_stat_view; +CREATE VIEW game_stat_view AS + SELECT title_id, scenario, result, count(*) AS count + FROM game_full_view + NATURAL JOIN titles + WHERE hidden=0 AND is_solo=0 AND status=2 + GROUP BY title_name, scenario, result + ; -- cgit v1.2.3