Add vrctl parse and reminder

This commit is contained in:
2026-08-09 20:02:34 +02:00
parent 6f1e8f8087
commit afdba9a6ad
3 changed files with 137 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
module.exports = {
up: async ({ context: db }) => {
db.exec(`
CREATE TABLE IF NOT EXISTS vrctl_event_reminders (
id INTEGER PRIMARY KEY AUTOINCREMENT,
vrctl_event_id TEXT NOT NULL,
message_id TEXT NOT NULL,
channel_id TEXT NOT NULL,
event_name TEXT,
event_start INTEGER NOT NULL,
reminder_sent INTEGER NOT NULL DEFAULT 0,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
`);
db.exec(`CREATE INDEX IF NOT EXISTS idx_vrctl_reminders_pending ON vrctl_event_reminders (reminder_sent, event_start);`);
},
down: async ({ context: db }) => {
db.exec(`DROP TABLE IF EXISTS vrctl_event_reminders;`);
}
};