From 9d19023f554dee7d8656a18dd81479decc03b3ee Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Tue, 30 Mar 2021 16:36:14 -0400 Subject: Modified the jobs table. Added job derived type to the database module. Need accessor calls. --- captain/sql/create.sql | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'captain/sql/create.sql') 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)); -- cgit v1.2.3