diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-06-16 16:26:27 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2021-06-19 11:48:10 +0200 |
commit | fb9fa1b6365c1c13e00c35257e53eebf610f0c6c (patch) | |
tree | 930f61cfee6993158b176eed036bb0ecbf35de88 /tools | |
parent | 4fb5d7ac18b8121044ed1b01dc6000161985b089 (diff) | |
download | server-fb9fa1b6365c1c13e00c35257e53eebf610f0c6c.tar.gz |
Add mail notifications.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/sql/schema.txt | 11 |
1 files changed, 10 insertions, 1 deletions
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; |