-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.sql
More file actions
32 lines (29 loc) · 1014 Bytes
/
schema.sql
File metadata and controls
32 lines (29 loc) · 1014 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
CREATE TABLE IF NOT EXISTS reminders (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT NOT NULL,
content TEXT NOT NULL,
trigger_time TEXT NOT NULL,
recipient_email TEXT NOT NULL,
sent INTEGER DEFAULT 0,
created_at TEXT DEFAULT CURRENT_TIMESTAMP,
repeat_type TEXT DEFAULT NULL,
repeat_interval INTEGER DEFAULT NULL,
next_trigger_time TEXT,
last_sent_time TEXT
);
CREATE TABLE IF NOT EXISTS smtp_config (
id INTEGER PRIMARY KEY AUTOINCREMENT,
server TEXT NOT NULL,
port INTEGER NOT NULL,
sender_email TEXT NOT NULL,
password TEXT NOT NULL,
sender_name TEXT NOT NULL,
created_at TEXT DEFAULT CURRENT_TIMESTAMP,
updated_at TEXT DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE IF NOT EXISTS auth (
id INTEGER PRIMARY KEY AUTOINCREMENT,
password_hash TEXT NOT NULL,
updated_at TEXT DEFAULT CURRENT_TIMESTAMP
);
INSERT OR IGNORE INTO auth (id, password_hash) VALUES (1, '$2b$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy');