aboutsummaryrefslogtreecommitdiff
path: root/captain/sql
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2021-03-30 16:36:14 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2021-03-30 16:36:14 -0400
commit9d19023f554dee7d8656a18dd81479decc03b3ee (patch)
tree2aae2391b4edb14ca7b52634be4f438de6fc80f0 /captain/sql
parentc6a3bdfc5e02b9e35b1e0fc5af2d0bf0319681ac (diff)
downloadlevitating-9d19023f554dee7d8656a18dd81479decc03b3ee.tar.gz
levitating-9d19023f554dee7d8656a18dd81479decc03b3ee.zip
Modified the jobs table. Added job derived type to the database module. Need accessor calls.
Diffstat (limited to 'captain/sql')
-rw-r--r--captain/sql/create.sql6
1 files changed, 2 insertions, 4 deletions
diff --git a/captain/sql/create.sql b/captain/sql/create.sql
index e8198e4..745c536 100644
--- a/captain/sql/create.sql
+++ b/captain/sql/create.sql
@@ -1,12 +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 jobs(id INTEGER PRIMARY KEY, player INTEGER, instruction INTEGER, status INTEGER, time TEXT DEFAULT NULL, FOREIGN KEY(player) REFERENCES players(id), FOREIGN KEY(instruction) REFERENCES instructions(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 UNIQUE NOT NULL);
-CREATE_TABLE available(instruction INTEGER, player INTEGER, \
- FOREIGN KEY(instruction) REFERENCES instructions(id), \
- FOREIGN KEY(player) REFERENCES players(id));
+CREATE TABLE available(instruction INTEGER, player INTEGER, FOREIGN KEY(instruction) REFERENCES instructions(id), FOREIGN KEY(player) REFERENCES players(id));