added user table and places visited table
This commit is contained in:
parent
58b91501ef
commit
98063d6a70
1 changed files with 8 additions and 0 deletions
|
@ -60,6 +60,14 @@ class DB:
|
|||
CREATE TABLE IF NOT EXISTS entries
|
||||
([ID] INTEGER PRIMARY KEY, [title] TEXT, [latitude] FLOAT, [longitude] FLOAT, [votes] INTEGER, [image_url], STRING)
|
||||
''')
|
||||
cursor.execute('''
|
||||
CREATE TABLE IF NOT EXISTS users
|
||||
([ID] INTEGER PRIMARY KEY, [username] TEXT, [password_salt] TEXT, [password_hash] TEXT)
|
||||
''')
|
||||
cursor.execute('''
|
||||
CREATE TABLE IF NOT EXISTS places_visited
|
||||
([ID] INTEGER PRIMARY KEY, [userID] INTEGER, [entryID] INTEGER)
|
||||
''')
|
||||
|
||||
cursor.commit()
|
||||
|
||||
|
|
Reference in a new issue