diff --git a/initdb.py b/initdb.py index 4d98870..de8d014 100644 --- a/initdb.py +++ b/initdb.py @@ -1,3 +1,10 @@ import sqlite3 -sqlite3.connect("leaderboard.db") \ No newline at end of file +# RUN THIS FILE ONLY ONCE BEFORE STARTING THE API + +dbcon = sqlite3.connect("leaderboard.db") +db = dbcon.cursor() + +db.execute('''CREATE TABLE IF NOT EXISTS leaderboard([time_id] INTEGER PRIMARY KEY, [time_username] TEXT, [time_time] REAL, [time_map] TEXT, [time_gamever] TEXT)''') + +dbcon.commit() \ No newline at end of file