-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sql
More file actions
26 lines (21 loc) · 760 Bytes
/
init.sql
File metadata and controls
26 lines (21 loc) · 760 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
CREATE TABLE IF NOT EXISTS groups (
group_id INTEGER PRIMARY KEY,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE IF NOT EXISTS group_settings (
settings_id INTEGER PRIMARY KEY,
group_id INTEGER NOT NULL,
accept_only_messages BOOLEAN DEFAULT(0),
accept_only_commands BOOLEAN DEFAULT(0),
default_quality TEXT DEFAULT('720'),
FOREIGN KEY (group_id) REFERENCES groups(group_id) ON DELETE CASCADE
);
CREATE TABLE IF NOT EXISTS group_activity (
id INTEGER PRIMARY KEY AUTOINCREMENT,
group_id INTEGER NOT NULL,
timestamp DATETIME DEFAULT CURRENT_TIMESTAMP
);
-- settings
-- accept_only_messages: false/true
-- accept_only_commands: false/true
-- default_quality: 480/720/1080