diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-06-08 21:53:40 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-06-09 17:42:23 +0200 |
commit | ff4bc953f16002befbd6cf8dd120a96cfeca26fe (patch) | |
tree | 0aef045b9338a3bb1ac522fefb557bf8f54d746b /schema.sql | |
parent | 68df9a26cda411be54403883baa752c38e15e797 (diff) | |
download | server-ff4bc953f16002befbd6cf8dd120a96cfeca26fe.tar.gz |
Allow users to leave and join active games.
Add "Need replacement" list of games.
Diffstat (limited to 'schema.sql')
-rw-r--r-- | schema.sql | 22 |
1 files changed, 0 insertions, 22 deletions
@@ -387,28 +387,6 @@ create view your_turn as and active in ('All', 'Both', role) ; --- Triggers -- - -drop trigger if exists no_part_on_active_game; -create trigger no_part_on_active_game before delete on players -begin - select - raise(abort, 'Cannot remove players from started games.') - where - (select status from games where games.game_id = old.game_id) > 0 - ; -end; - -drop trigger if exists no_join_on_active_game; -create trigger no_join_on_active_game before insert on players -begin - select - raise(abort, 'Cannot add players to started games.') - where - (select status from games where games.game_id = new.game_id) > 0 - ; -end; - -- Manual key management if pragma foreign_keys = off drop trigger if exists trigger_delete_on_games; create trigger trigger_delete_on_games after delete on games |