summaryrefslogtreecommitdiff
path: root/schema.sql
diff options
context:
space:
mode:
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