aboutsummaryrefslogtreecommitdiff
path: root/captain/sql
diff options
context:
space:
mode:
Diffstat (limited to 'captain/sql')
-rw-r--r--captain/sql/create.sql10
1 files changed, 10 insertions, 0 deletions
diff --git a/captain/sql/create.sql b/captain/sql/create.sql
new file mode 100644
index 0000000..d78c90c
--- /dev/null
+++ b/captain/sql/create.sql
@@ -0,0 +1,10 @@
+
+CREATE TABLE players(id INTEGER PRIMARY KEY, name TEXT NOT NULL, token TEXT NOT NULL);
+
+CREATE TABLE jobs(id INTEGER PRIMARY KEY, player INTEGER DEFAULT NULL, status INTEGER, FOREIGN KEY(player) REFERENCES players(id));
+
+CREATE TABLE tasks(job INTEGER, task INTEGER, status INTEGER, FOREIGN KEY(job) REFERENCES jobs(id));
+
+CREATE TABLE instructions(id INTEGER PRIMARY KEY, name TEXT NOT NULL, file TEXT NOT NULL);
+
+CREATE_TABLE available(instructions INTEGER, player INTEGER, FOREIGN KEY(instructions) REFERENCES instructions(id), FOREIGN KEY(player) REFERENCES players(id));