diff options
Diffstat (limited to 'captain/sql')
-rw-r--r-- | captain/sql/create.sql | 6 |
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)); |