-
Notifications
You must be signed in to change notification settings - Fork 12
/
init_db.py
executable file
·17 lines (11 loc) · 1.09 KB
/
init_db.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/python
import sqlite3
conn = sqlite3.connect('cached.db')
print "Opened database successfully"
conn.execute('''CREATE TABLE CACHED
(USERID VCAHR(50) NOT NULL,
ENTRYHASHED CHAR(64) NOT NULL);
''')
conn.execute("CREATE INDEX index1 ON cached (USERID);")
print "Table created successfully"
conn.close()