summaryrefslogtreecommitdiffstats
path: root/db/old_migrations/patch-notification_sent_history.sql
blob: 759eb38212b3bdafe102b23b535a33b13953323e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;