aboutsummaryrefslogtreecommitdiff
path: root/sqitch/sqlite/deploy/build_allocation_tables.sql
blob: c87438cf89dc40b987032d41bad99c187e490e4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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;