-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmake_db.py
26 lines (17 loc) · 997 Bytes
/
make_db.py
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
import sqlite3
def make_sql_table(con):
cursorObj = con.cursor()
cursorObj.execute("CREATE TABLE IF NOT EXISTS dailyposts(id integer PRIMARY KEY, username text, postcount integer, currentday integer)")
con.commit()
cursorObj.execute("CREATE TABLE IF NOT EXISTS weeklyposts(id integer PRIMARY KEY, username text, postcount integer, currentweek integer)")
con.commit()
cursorObj.execute("CREATE TABLE IF NOT EXISTS flairs(id integer PRIMARY KEY, postid text, flairtext text, timeset integer)")
con.commit()
cursorObj.execute("CREATE TABLE IF NOT EXISTS schedules(id integer PRIMARY KEY, postid text, schedtime integer)")
con.commit()
cursorObj.execute("CREATE TABLE IF NOT EXISTS awards(id integer PRIMARY KEY, postid text, counted integer)")
con.commit()
cursorObj.execute("CREATE TABLE IF NOT EXISTS weeklongdeals(id integer PRIMARY KEY, week text, post text)")
con.commit()
con = sqlite3.connect('gamedealsbot.db')
make_sql_table(con)