-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy path20220521195821_initialize.sql
49 lines (44 loc) · 1.18 KB
/
20220521195821_initialize.sql
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
CREATE TABLE IF NOT EXISTS mod_action (
id integer primary key asc,
moderator integer not null,
usr integer not null,
reason text,
context text,
action_type integer not null,
create_date datetime
);
CREATE TABLE IF NOT EXISTS mute (
mod_action integer not null unique,
end_time datetime not null,
active boolean not null,
FOREIGN KEY(mod_action) REFERENCES mod_action(id) ON DELETE CASCADE
);
CREATE TABLE IF NOT EXISTS fetch (
usr integer primary key,
info text not null,
create_date datetime
);
CREATE TABLE IF NOT EXISTS blocked_regexes (
pattern text primary key,
added_by integer not null
);
CREATE TABLE IF NOT EXISTS tag (
name text primary key,
moderator integer not null,
content text not null,
official boolean not null,
create_date datetime
);
CREATE TABLE IF NOT EXISTS highlights (
word text not null,
usr integer not null,
PRIMARY KEY (word, usr)
);
CREATE TABLE IF NOT EXISTS emoji_stats (
emoji_id integer not null,
emoji_name text,
animated integer not null,
in_text_usage integer not null default 0,
reaction_usage integer not null default 0,
PRIMARY KEY(emoji_id)
);