internal/store/migrations/0009_notifications.up.sql

d298215429fa4946ce82afebe7364ad178725e7b
gitbay/internal/store/migrations/0009_notifications.up.sql

14 lines · 525 bytes

 1CREATE TABLE notifications (
 2    id              INTEGER PRIMARY KEY,
 3    recipient       TEXT NOT NULL,
 4    subject         TEXT NOT NULL,
 5    body            TEXT NOT NULL,
 6    attempts        INTEGER NOT NULL DEFAULT 0,
 7    next_attempt_at TEXT,
 8    sent_at         TEXT,
 9    failed_at       TEXT,
10    last_error      TEXT,
11    created_at      TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ','now'))
12);
13CREATE INDEX notifications_due ON notifications(next_attempt_at)
14    WHERE sent_at IS NULL AND failed_at IS NULL;
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form