diff options
Diffstat (limited to 'tools/sql')
-rw-r--r-- | tools/sql/schema.txt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/sql/schema.txt b/tools/sql/schema.txt index 57e369e..2f84e82 100644 --- a/tools/sql/schema.txt +++ b/tools/sql/schema.txt @@ -52,7 +52,12 @@ CREATE TABLE IF NOT EXISTS games ( status INTEGER, result TEXT, active TEXT, - state TEXT, + state TEXT +); + +CREATE TABLE IF NOT EXISTS chats ( + game_id INTEGER PRIMARY KEY, + time TIMESTAMP, chat TEXT ); @@ -104,4 +109,5 @@ CREATE TRIGGER purge_players AFTER DELETE ON games BEGIN DELETE FROM players WHERE game_id = old.game_id; DELETE FROM notifications WHERE game_id = old.game_id; + DELETE FROM chats WHERE game_id = old.game_id; END; |