-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSETUP_DATABASES.py
More file actions
50 lines (31 loc) · 1.24 KB
/
SETUP_DATABASES.py
File metadata and controls
50 lines (31 loc) · 1.24 KB
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
from Database import Database
database = Database('answer_an_questions.db')
try:
database.execute('DROP TABLE users')
except:
pass
database.execute('CREATE TABLE users (id INTEGER PRIMARY KEY AUTOINCREMENT, admin_id INTEGER, user_id INTEGER, answer TEXT)')
database = Database('logs.db')
try:
database.execute('DROP TABLE logs')
except:
pass
database.execute('CREATE TABLE logs (id INTEGER PRIMARY KEY AUTOINCREMENT, time TEXT, type TEXT, user_id INTEGER, description TEXT)')
database = Database('questions.db')
try:
database.execute('DROP TABLE questions')
except:
pass
database.execute('CREATE TABLE questions (id INTEGER PRIMARY KEY AUTOINCREMENT, user_id INTEGER, description TEXT)')
database = Database('reports.db')
try:
database.execute('DROP TABLE reports')
except:
pass
database.execute('CREATE TABLE reports (id INTEGER PRIMARY KEY AUTOINCREMENT, user_id INTEGER, description TEXT)')
database = Database('user_database.db')
try:
database.execute('DROP TABLE users')
except:
pass
database.execute('CREATE TABLE users (id INTEGER PRIMARY KEY AUTOINCREMENT, user_id INTEGER, chat_id INTEGER, ban_status INTEGER, menu TEXT, data_storage TEXT, user_info TEXT)')