summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--auth.go2
-rw-r--r--sql/schema.sql3
2 files changed, 3 insertions, 2 deletions
diff --git a/auth.go b/auth.go
index fd8b482..e1a664d 100644
--- a/auth.go
+++ b/auth.go
@@ -238,7 +238,7 @@ func handleAuth(w http.ResponseWriter, req *http.Request) {
*/
_, err = db.Exec(
req.Context(),
- "INSERT INTO users (id, name, email, department, session, expr) VALUES ($1, $2, $3, $4, $5, $6)",
+ "INSERT INTO users (id, name, email, department, session, expr, confirmed) VALUES ($1, $2, $3, $4, $5, $6, false)",
claims.Oid,
claims.Name,
claims.Email,
diff --git a/sql/schema.sql b/sql/schema.sql
index 51a455b..ee69906 100644
--- a/sql/schema.sql
+++ b/sql/schema.sql
@@ -13,7 +13,8 @@ CREATE TABLE users (
email TEXT NOT NULL,
department TEXT NOT NULL,
session TEXT,
- expr BIGINT -- seconds
+ expr BIGINT, -- seconds
+ confirmed BOOLEAN NOT NULL
);
CREATE TABLE choices (
PRIMARY KEY (userid, courseid),