added user table and places visited table

This commit is contained in:
ellie 2022-10-29 21:06:04 +01:00
parent 58b91501ef
commit 98063d6a70

View file

@ -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()