diff options
Diffstat (limited to 'sqitch/sqlite/deploy/build_allocation_tables.sql')
-rw-r--r-- | sqitch/sqlite/deploy/build_allocation_tables.sql | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sqitch/sqlite/deploy/build_allocation_tables.sql b/sqitch/sqlite/deploy/build_allocation_tables.sql new file mode 100644 index 0000000..c87438c --- /dev/null +++ b/sqitch/sqlite/deploy/build_allocation_tables.sql @@ -0,0 +1,17 @@ +-- Deploy guix-build-coordinator:build_allocation_tables to sqlite + +BEGIN; + +CREATE TABLE allocated_builds ( + build_id PRIMARY KEY NOT NULL REFERENCES builds (uuid), + agent_id NOT NULL REFERENCES agents (id) +); + +CREATE TABLE build_allocation_plan ( + build_id NOT NULL REFERENCES builds (uuid), + agent_id NOT NULL REFERENCES agents (id), + ordering INTEGER NOT NULL, + PRIMARY KEY (agent_id, build_id) +); + +COMMIT; |