summaryrefslogtreecommitdiff
path: root/schema.sql
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-06-08 21:53:40 +0200
committerTor Andersson <tor@ccxvii.net>2022-06-09 17:42:23 +0200
commitff4bc953f16002befbd6cf8dd120a96cfeca26fe (patch)
tree0aef045b9338a3bb1ac522fefb557bf8f54d746b /schema.sql
parent68df9a26cda411be54403883baa752c38e15e797 (diff)
downloadserver-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.sql22
1 files changed, 0 insertions, 22 deletions
diff --git a/schema.sql b/schema.sql
index 14912d0..a5ec561 100644
--- a/schema.sql
+++ b/schema.sql
@@ -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