aboutsummaryrefslogtreecommitdiff
path: root/captain/sql
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2021-06-21 11:04:31 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2021-06-21 11:04:31 -0400
commit20091904b7bf4b2074b45e25c7eee0e56d19348b (patch)
tree5c31004eff65466c84ed88cde77cbc712ba04ea6 /captain/sql
parentcd9283417a4b70335edf7ce0c5d15bfca111b807 (diff)
downloadlevitating-20091904b7bf4b2074b45e25c7eee0e56d19348b.tar.gz
levitating-20091904b7bf4b2074b45e25c7eee0e56d19348b.zip
Groups of instructions are now supported, allowing launching multiple jobs at once
Diffstat (limited to 'captain/sql')
-rw-r--r--captain/sql/create.sql3
1 files changed, 3 insertions, 0 deletions
diff --git a/captain/sql/create.sql b/captain/sql/create.sql
index c09d120..6457296 100644
--- a/captain/sql/create.sql
+++ b/captain/sql/create.sql
@@ -9,3 +9,6 @@ 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), UNIQUE(instruction, player));
+CREATE TABLE groups(id INTEGER PRIMARY KEY, name TEXT UNIQUE NOT NULL);
+
+CREATE TABLE group_instructions(group_id INTEGER, instruction INTEGER, player INTEGER, FOREIGN KEY(group_id) REFERENCES groups(id) ON DELETE CASCADE, FOREIGN KEY(instruction) REFERENCES instructions(id) ON DELETE CASCADE, FOREIGN KEY(player) REFERENCES players(id) ON DELETE CASCADE);