Rework the builds and build_status tables as well as related code
Allow for build status information to be submitted by POST request. This required some changes to the builds and build_status tables, as for example, the Cuirass build id may not be available, and the derivation may not be know yet, so just record the derivation file name.
This commit is contained in:
parent
0ffd8caeeb
commit
5663235048
16 changed files with 510 additions and 229 deletions
21
sqitch/deploy/rework_builds.sql
Normal file
21
sqitch/deploy/rework_builds.sql
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
-- Deploy guix-data-service:rework_builds to pg
|
||||
|
||||
BEGIN;
|
||||
|
||||
DROP TABLE build_status;
|
||||
DROP TABLE builds;
|
||||
|
||||
CREATE TABLE builds (
|
||||
id integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
|
||||
build_server_id integer NOT NULL REFERENCES build_servers(id),
|
||||
derivation_file_name varchar NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE build_status (
|
||||
id integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
|
||||
build_id integer NOT NULL REFERENCES builds(id),
|
||||
"timestamp" timestamp without time zone DEFAULT clock_timestamp() NOT NULL,
|
||||
status guix_data_service.buildstatus NOT NULL
|
||||
);
|
||||
|
||||
COMMIT;
|
||||
Loading…
Add table
Add a link
Reference in a new issue