diff options
author | Christopher Baines <mail@cbaines.net> | 2019-12-04 22:04:44 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-12-04 22:04:44 +0100 |
commit | 76eca407910ce8ca714291c74dec8d9761590d56 (patch) | |
tree | e14d95302c9bcc9be518a6cd530e3fb179e43c22 | |
parent | f0b16b5a7c6503c6df855ed9d36cfd1bb39cab8c (diff) | |
download | data-service-76eca407910ce8ca714291c74dec8d9761590d56.tar data-service-76eca407910ce8ca714291c74dec8d9761590d56.tar.gz |
Add a table to record where narinfo files were fetched from
Otherwise it's hard to associated narinfo files to build servers.
-rw-r--r-- | sqitch/deploy/narinfo_fetch_record.sql | 12 | ||||
-rw-r--r-- | sqitch/revert/narinfo_fetch_record.sql | 7 | ||||
-rw-r--r-- | sqitch/sqitch.plan | 1 | ||||
-rw-r--r-- | sqitch/verify/narinfo_fetch_record.sql | 7 |
4 files changed, 27 insertions, 0 deletions
diff --git a/sqitch/deploy/narinfo_fetch_record.sql b/sqitch/deploy/narinfo_fetch_record.sql new file mode 100644 index 0000000..26abd35 --- /dev/null +++ b/sqitch/deploy/narinfo_fetch_record.sql @@ -0,0 +1,12 @@ +-- Deploy guix-data-service:narinfo_fetch_record to pg + +BEGIN; + +CREATE TABLE narinfo_fetch_records ( + id integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY, + narinfo_signature_data_id integer NOT NULL REFERENCES narinfo_signature_data(id), + build_server_id integer NOT NULL REFERENCES build_servers(id), + fetched_at timestamp without time zone DEFAULT clock_timestamp() +); + +COMMIT; diff --git a/sqitch/revert/narinfo_fetch_record.sql b/sqitch/revert/narinfo_fetch_record.sql new file mode 100644 index 0000000..939d198 --- /dev/null +++ b/sqitch/revert/narinfo_fetch_record.sql @@ -0,0 +1,7 @@ +-- Revert guix-data-service:narinfo_fetch_record from pg + +BEGIN; + +DROP TABLE narinfo_fetch_record; + +COMMIT; diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan index e79df69..3b16f94 100644 --- a/sqitch/sqitch.plan +++ b/sqitch/sqitch.plan @@ -31,3 +31,4 @@ build_server_token_seeds 2019-11-23T09:26:48Z Christopher Baines <mail@cbaines.n rework_builds 2019-11-23T20:41:20Z Christopher Baines <mail@cbaines.net> # Rework the build tables nar_related_tables 2019-11-29T20:28:19Z Christopher Baines <mail@cbaines.net> # Add nar related tables add_index_on_builds_derivation_file_name 2019-12-03T16:23:55Z <chris@phact> # Add index on builds_derivation_file_name +narinfo_fetch_record 2019-12-03T20:53:28Z <chris@phact> # Add a table to describe fetching a narinfo diff --git a/sqitch/verify/narinfo_fetch_record.sql b/sqitch/verify/narinfo_fetch_record.sql new file mode 100644 index 0000000..028d113 --- /dev/null +++ b/sqitch/verify/narinfo_fetch_record.sql @@ -0,0 +1,7 @@ +-- Verify guix-data-service:narinfo_fetch_record on pg + +BEGIN; + +-- XXX Add verifications here. + +ROLLBACK; |