forked from LewisProjects/Ogiroid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sql
113 lines (97 loc) · 1.65 KB
/
setup.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
CREATE TABLE
IF NOT EXISTS tags
(
tag_id TEXT,
content TEXT,
owner BIGINT,
created_at BIGINT,
views INTEGER
);
CREATE TABLE
IF NOT EXISTS tag_relations
(
tag_id TEXT,
alias TEXT
);
CREATE TABLE
IF NOT EXISTS blacklist
(
user_id BIGINT,
reason TEXT,
bot BOOLEAN,
tickets BOOLEAN,
tags BOOLEAN,
expires BIGINT
);
CREATE TABLE
IF NOT EXISTS flag_quizz
(
user_id BIGINT,
tries INTEGER,
correct INTEGER,
completed INTEGER
);
CREATE TABLE
IF NOT EXISTS trivia
(
id BIGINT,
correct INTEGER,
incorrect INTEGER,
streak INTEGER,
longest_streak INTEGER
);
CREATE TABLE
IF NOT EXISTS reaction_roles
(
message_id BIGINT,
role_id BIGINT,
emoji TEXT,
roles_given INTEGER DEFAULT 0
);
CREATE TABLE
IF NOT EXISTS warnings
(
warning_id SERIAL PRIMARY KEY,
user_id BIGINT,
moderator_id BIGINT,
reason TEXT
);
CREATE TABLE
IF NOT EXISTS levels
(
guild_id BIGINT,
user_id BIGINT,
level INTEGER DEFAULT 0,
xp INTEGER DEFAULT 0
);
CREATE TABLE
IF NOT EXISTS role_rewards
(
guild_id BIGINT,
role_id BIGINT,
required_lvl INTEGER DEFAULT 0
);
CREATE TABLE
IF NOT EXISTS birthday
(
user_id BIGINT,
birthday TEXT DEFAULT NULL,
birthday_last_changed BIGINT DEFAULT NULL
);
CREATE TABLE
IF NOT EXISTS timezone
(
user_id BIGINT,
timezone TEXT DEFAULT NULL,
timezone_last_changed BIGINT DEFAULT NULL
);
CREATE TABLE
IF NOT EXISTS config
(
guild_id BIGINT,
xp_boost INTEGER DEFAULT 1,
xp_boost_expiry BIGINT DEFAULT 0,
xp_boost_enabled BOOLEAN DEFAULT TRUE,
UNIQUE(guild_id)
);
DROP TABLE IF EXISTS xp_boosts_user;