summaryrefslogtreecommitdiffstats
path: root/db/old_migrations/patch-notification_sent_history.sql
diff options
context:
space:
mode:
Diffstat (limited to 'db/old_migrations/patch-notification_sent_history.sql')
-rw-r--r--db/old_migrations/patch-notification_sent_history.sql18
1 files changed, 18 insertions, 0 deletions
diff --git a/db/old_migrations/patch-notification_sent_history.sql b/db/old_migrations/patch-notification_sent_history.sql
new file mode 100644
index 0000000..759eb38
--- /dev/null
+++ b/db/old_migrations/patch-notification_sent_history.sql
@@ -0,0 +1,18 @@
+-- You should not modify if this have pushed to Github, unless it does serious wrong with the db.
+BEGIN TRANSACTION;
+
+CREATE TABLE [notification_sent_history] (
+ [id] INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
+ [type] VARCHAR(50) NOT NULL,
+ [monitor_id] INTEGER NOT NULL,
+ [days] INTEGER NOT NULL,
+ UNIQUE([type], [monitor_id], [days])
+);
+
+CREATE INDEX [good_index] ON [notification_sent_history] (
+ [type],
+ [monitor_id],
+ [days]
+);
+
+COMMIT;