From fb9fa1b6365c1c13e00c35257e53eebf610f0c6c Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 16 Jun 2021 16:26:27 +0200 Subject: Add mail notifications. --- tools/sql/schema.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tools/sql') diff --git a/tools/sql/schema.txt b/tools/sql/schema.txt index 227d861..a75ce1d 100644 --- a/tools/sql/schema.txt +++ b/tools/sql/schema.txt @@ -7,7 +7,15 @@ CREATE TABLE IF NOT EXISTS users ( ctime TIMESTAMP, cip TEXT, atime TIMESTAMP, - aip TEXT + aip TEXT, + notifications INTEGER +); + +CREATE TABLE IF NOT EXISTS notifications ( + user_id INTEGER, + game_id INTEGER, + time TIMESTAMP, + UNIQUE ( user_id, game_id ) ); CREATE TABLE IF NOT EXISTS blacklist_ip ( ip TEXT PRIMARY KEY ); @@ -89,4 +97,5 @@ DROP TRIGGER IF EXISTS purge_players; 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; END; -- cgit v1.2.3