internal/store/migrations/0073_mail_reply.up.sql
13 lines · 736 bytes
1-- Reply by mail (#295). notify_reply puts a Reply-To carrying a reply
2-- token on the account's issue and merge request mail when the instance
3-- polls a mailbox for replies. notifications.reply_to is that address,
4-- per queued message, blanked once it is sent. mail_replies records each
5-- reply that posted a comment, keyed by account, thread and Message-ID
6-- (or a hash of the message when it has none), so a message fetched
7-- twice posts once.
8ALTER TABLE users ADD COLUMN notify_reply INTEGER NOT NULL DEFAULT 0;
9ALTER TABLE notifications ADD COLUMN reply_to TEXT NOT NULL DEFAULT '';
10CREATE TABLE mail_replies (
11 message_key TEXT PRIMARY KEY,
12 created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ','now'))
13);