aboutsummaryrefslogtreecommitdiff
path: root/captain/sql
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2022-04-27 09:52:34 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2022-04-27 09:52:34 -0400
commite5a2850b6bb9887b241316be24b3f7047cef6ea3 (patch)
treeb4b2f8b73200d24d1247a44fe522f832e6be103e /captain/sql
parent6cf8d2b298b0770b46753a902b4c5622b5b1ddd2 (diff)
downloadlevitating-e5a2850b6bb9887b241316be24b3f7047cef6ea3.tar.gz
levitating-e5a2850b6bb9887b241316be24b3f7047cef6ea3.zip
Added command line args to create an admin user. Fixed a few db bugs.
Diffstat (limited to 'captain/sql')
-rw-r--r--captain/sql/create.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/captain/sql/create.sql b/captain/sql/create.sql
index 9e4d204..7517e07 100644
--- a/captain/sql/create.sql
+++ b/captain/sql/create.sql
@@ -17,7 +17,7 @@ CREATE TABLE checkin(player INTEGER PRIMARY KEY, year INTEGER, month INTEGER, da
CREATE TABLE schedule(instruction INTEGER NOT NULL, player INTEGER NOT NULL, day INTEGER DEFAULT 0, hour INTEGER DEFAULT 0, FOREIGN KEY(instruction) REFERENCES instructions(id) ON DELETE CASCADE, FOREIGN KEY(player) REFERENCES players(id) ON DELETE CASCADE );
-CREATE TABLE users(id INTEGER PRIMARY KEY, username TEXT UNIQUE NOT NULL, email TEXT NOT NULL, password TEXT NOT NULL, level INTEGER DEFAULT 1);
+CREATE TABLE users(id INTEGER PRIMARY KEY AUTOINCREMENT, username TEXT UNIQUE NOT NULL, email TEXT NOT NULL, password TEXT NOT NULL, level INTEGER DEFAULT 1);
CREATE TABLE sessions(user INTEGER, session TEXT NOT NULL, expiration TEXT NOT NULL, FOREIGN KEY(user) REFERENCES users(id) ON DELETE CASCADE);