summaryrefslogtreecommitdiff
path: root/schema.sql
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-11-23 12:17:25 +0100
committerTor Andersson <tor@ccxvii.net>2024-11-23 12:24:54 +0100
commit3f2c801b616f4c23c28c03d938bbadefefb49eb0 (patch)
treeb7e0eb5008c8faa93245c8c7f6037d77701a1962 /schema.sql
parent9f829056d1f3c45a0cea54dbd58d154274e2964b (diff)
downloadserver-3f2c801b616f4c23c28c03d938bbadefefb49eb0.tar.gz
Pause inactive users from tournament queue.HEADmaster
Remove very inactive users from tournament queue. Count tournaments as "open" while they still have players queued.
Diffstat (limited to 'schema.sql')
-rw-r--r--schema.sql11
1 files changed, 11 insertions, 0 deletions
diff --git a/schema.sql b/schema.sql
index e945916..4ae8bb5 100644
--- a/schema.sql
+++ b/schema.sql
@@ -632,6 +632,17 @@ create table if not exists tm_winners (
create index if not exists tm_winners_pool_idx on tm_winners(pool_id);
+drop view if exists tm_queue_view;
+create view tm_queue_view as
+ select
+ tm_queue.*
+ from
+ tm_queue
+ join user_last_seen using(user_id)
+ where
+ julianday() - julianday(atime) < 3
+ ;
+
drop view if exists tm_pool_active_view;
create view tm_pool_active_view as
select