forked from kantek/kantek
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDATABASE.sql
180 lines (147 loc) · 3.16 KB
/
DATABASE.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
create table if not exists banlist
(
id bigint not null
constraint banlist_pkey
primary key,
reason text not null,
date timestamp not null,
message text
);
alter table banlist owner to jonas;
create table if not exists strafanzeigen
(
key text not null
constraint strafanzeigen_pkey
primary key,
data text not null,
creation_date timestamp default now()
);
alter table strafanzeigen owner to jonas;
create table if not exists chats
(
id bigint not null
constraint chats_pkey
primary key,
tags jsonb not null,
permissions jsonb,
locked boolean default false
);
alter table chats owner to jonas;
create table if not exists blacklists.bio
(
id serial not null
constraint bio_pkey
primary key,
item text not null,
retired boolean default false
);
alter table blacklists.bio owner to jonas;
create table if not exists blacklists.string
(
id serial not null
constraint string_pkey
primary key,
item text not null,
retired boolean default false
);
alter table blacklists.string owner to jonas;
create table if not exists blacklists.channel
(
id serial not null
constraint channel_pkey
primary key,
item text not null,
retired boolean default false
);
alter table blacklists.channel owner to jonas;
create table if not exists blacklists.domain
(
id serial not null
constraint domain_pkey
primary key,
item text not null,
retired boolean default false
);
alter table blacklists.domain owner to jonas;
create table if not exists blacklists.file
(
id serial not null
constraint file_pkey
primary key,
item text not null,
retired boolean default false
);
alter table blacklists.file owner to jonas;
create table if not exists blacklists.mhash
(
id serial not null
constraint mhash_pkey
primary key,
item text not null,
retired boolean default false
);
alter table blacklists.mhash owner to jonas;
create table if not exists templates
(
name text
constraint templates_name_key
unique,
content text
);
alter table templates owner to jonas;
create table if not exists whitelist
(
id integer not null
constraint id
primary key
);
alter table whitelist owner to jonas;
create table if not exists adderlist
(
uid integer not null
constraint adderlist_pk
primary key,
count integer,
modify_date timestamp default now()
);
alter table adderlist owner to jonas;
create table if not exists cute_chain
(
uid integer not null
constraint cute_chain_pk
primary key,
loved_by integer not null
);
alter table cute_chain owner to jonas;
create table if not exists users
(
tg_id bigint not null
constraint users_pkey
primary key,
first_name text,
f915068391_hash text,
f357693014_hash text,
f778274583_hash text,
f1102450249_hash text,
f358491576_hash text,
f1175015621_hash text
);
alter table users owner to jonas;
create table if not exists wordlist
(
word text not null
constraint word
primary key,
count integer
);
alter table wordlist owner to jonas;
create table if not exists adding_list
(
adder_id integer,
added_id integer,
chat_id integer,
raw_update text
);
alter table adding_list owner to jonas;
create unique index if not exists adding_list_raw_update_uindex
on adding_list (raw_update);