-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsupport.py
More file actions
35 lines (30 loc) · 882 Bytes
/
support.py
File metadata and controls
35 lines (30 loc) · 882 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
27
28
29
30
31
32
33
34
35
def build_bd(cur, con):
cur.execute('''CREATE TABLE IF NOT EXISTS "Admins" (
"id" INTEGER,
"id_users" INTEGER,
"chat_id" INTEGER,
PRIMARY KEY("id" AUTOINCREMENT)
)''')
cur.execute('''CREATE TABLE IF NOT EXISTS "Chats" (
"id" INTEGER,
"id_tg" INTEGER,
"name" TEXT,
"owner_id" INTEGER,
PRIMARY KEY("id" AUTOINCREMENT)
)''')
cur.execute('''CREATE TABLE IF NOT EXISTS "Members" (
"user_id" INTEGER,
"chat_id" INTEGER
)''')
cur.execute('''CREATE TABLE IF NOT EXISTS "Passes" (
"chat_id" INTEGER,
"collection_address" TEXT
)''')
cur.execute('''CREATE TABLE IF NOT EXISTS "Users" (
"id" INTEGER,
"id_tg" INTEGER,
"username" TEXT,
"address" TEXT,
PRIMARY KEY("id" AUTOINCREMENT)
)''')
con.commit()