aboutsummaryrefslogtreecommitdiffstats
path: root/schema.sql
diff options
context:
space:
mode:
Diffstat (limited to 'schema.sql')
-rw-r--r--schema.sql16
1 files changed, 16 insertions, 0 deletions
diff --git a/schema.sql b/schema.sql
new file mode 100644
index 0000000..3925ec6
--- /dev/null
+++ b/schema.sql
@@ -0,0 +1,16 @@
+-- spam table
+create table IF not exists spam
+(
+ user TEXT,
+ domain TEXT,
+ ts TEXT,
+ message TEXT,
+ primary key (domain, ts)
+);
+
+-- indicies
+create index if not exists domain_tx_idx
+ on spam (domain, ts);
+
+create index if not exists user_domain_idx
+ on spam (user, domain);