diff options
author | Christopher Baines <mail@cbaines.net> | 2019-06-02 22:00:29 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-06-02 22:00:29 +0100 |
commit | 5d06a28577f6a917ebacd3d6e7aab1a7c61c6e27 (patch) | |
tree | 61beae6704cabcb509ad7e5a3c2f0efaa095aaef /sqitch/deploy | |
parent | 4ccf3132b6f7e7946fc148228d4ff1ca93ab422c (diff) | |
download | data-service-5d06a28577f6a917ebacd3d6e7aab1a7c61c6e27.tar data-service-5d06a28577f6a917ebacd3d6e7aab1a7c61c6e27.tar.gz |
Add more detailed new revision job handling
Create a new events table for the new guix revision jobs, and update this when
processing a job starts, as well as finished with success or failure.
Additionally, remove the dependnency on open-inferior/container, as this
functionality isn't merged in to Guix master yet.
Diffstat (limited to 'sqitch/deploy')
-rw-r--r-- | sqitch/deploy/load_new_guix_revision_job_events.sql | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sqitch/deploy/load_new_guix_revision_job_events.sql b/sqitch/deploy/load_new_guix_revision_job_events.sql new file mode 100644 index 0000000..96731fb --- /dev/null +++ b/sqitch/deploy/load_new_guix_revision_job_events.sql @@ -0,0 +1,18 @@ +-- Deploy guix-data-service:load_new_guix_revision_job_events to pg + +BEGIN; + +CREATE TYPE job_event AS ENUM ('start', 'failure', 'success'); + +ALTER TABLE ONLY load_new_guix_revision_jobs + ADD CONSTRAINT load_new_guix_revision_jobs_id UNIQUE (id); + +CREATE TABLE load_new_guix_revision_job_events ( + id integer GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, + job_id integer NOT NULL, + event job_event NOT NULL, + occurred_at timestamp without time zone NOT NULL DEFAULT clock_timestamp(), + CONSTRAINT job_id FOREIGN KEY (job_id) REFERENCES load_new_guix_revision_jobs (id) +); + +COMMIT; |