aboutsummaryrefslogtreecommitdiff
path: root/tables.sql
diff options
context:
space:
mode:
Diffstat (limited to 'tables.sql')
-rw-r--r--tables.sql13
1 files changed, 12 insertions, 1 deletions
diff --git a/tables.sql b/tables.sql
index 5678eae..6520a3f 100644
--- a/tables.sql
+++ b/tables.sql
@@ -186,4 +186,15 @@ CREATE TABLE IF NOT EXISTS teacher_prediction
CONSTRAINT `fk_teacher_user` FOREIGN KEY (user_id) REFERENCES users (id),
CONSTRAINT `fk_teacher_teacher` FOREIGN KEY (teacher_id) REFERENCES users (id)
) ENGINE = InnoDB
- DEFAULT CHARSET = utf8; \ No newline at end of file
+ DEFAULT CHARSET = utf8;
+
+CREATE TABLE IF NOT EXISTS secrets
+(
+ id INTEGER PRIMARY KEY AUTO_INCREMENT,
+ user_id INTEGER NOT NULL,
+ secret VARCHAR(255) NOT NULL,
+
+ UNIQUE KEY uk_secret (user_id, secret),
+ CONSTRAINT `fk_user_secret` FOREIGN KEY (user_id) REFERENCES users (id)
+) ENGINE = InnoDB
+ DEFAULT CHARSET = utf8;