From ef70128552e12842820449e3a945b842eff9fe34 Mon Sep 17 00:00:00 2001 From: xeals Date: Mon, 27 Mar 2023 20:17:46 +1100 Subject: [PATCH] track knockouts --- main.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 725947b..fd88673 100755 --- a/main.py +++ b/main.py @@ -53,10 +53,14 @@ def _init_db(conn: sqlite3.Connection): game, player, name, specie, UNIQUE(game, player, specie) ); - """ - ) - conn.execute( - """ + CREATE TABLE IF NOT EXISTS knockouts( + game, turn, player, name, + UNIQUE(game, turn, player) + ); + CREATE TABLE IF NOT EXISTS games( + id, p1, p2, format, uploadtime, + UNIQUE(id) + ) """ )