diff options
author | Christopher Baines <mail@cbaines.net> | 2019-11-09 19:59:55 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-11-09 19:59:55 +0000 |
commit | 1442d17a3ddefdb18dcd8689bcf3dba903f11b8d (patch) | |
tree | 15993aa4cb20fd25e4a89660a1b0d2e5a40e3240 /sqitch | |
parent | fea4dc9385f6f42e7b89f1fafe1a8189f62af9eb (diff) | |
download | data-service-1442d17a3ddefdb18dcd8689bcf3dba903f11b8d.tar data-service-1442d17a3ddefdb18dcd8689bcf3dba903f11b8d.tar.gz |
Add a new table to describe the history of derivations
There's already the package_versions_by_guix_revision_range table, but I think
it would be also useful to be able to see how derivations change over time.
Diffstat (limited to 'sqitch')
4 files changed, 32 insertions, 0 deletions
diff --git a/sqitch/deploy/package_derivations_by_guix_revision_range.sql b/sqitch/deploy/package_derivations_by_guix_revision_range.sql new file mode 100644 index 0000000..e84c641 --- /dev/null +++ b/sqitch/deploy/package_derivations_by_guix_revision_range.sql @@ -0,0 +1,17 @@ +-- Deploy guix-data-service:package_derivations_by_guix_revision_range to pg + +BEGIN; + +CREATE TABLE package_derivations_by_guix_revision_range ( + git_repository_id integer NOT NULL REFERENCES git_repositories (id), + branch_name varchar NOT NULL, + package_name varchar NOT NULL, + package_version varchar NOT NULL, + derivation_id integer NOT NULL, + system varchar NOT NULL, + target varchar NOT NULL, + first_guix_revision_id integer NOT NULL REFERENCES guix_revisions (id), + last_guix_revision_id integer NOT NULL REFERENCES guix_revisions (id) +); + +COMMIT; diff --git a/sqitch/revert/package_derivations_by_guix_revision_range.sql b/sqitch/revert/package_derivations_by_guix_revision_range.sql new file mode 100644 index 0000000..1cc648d --- /dev/null +++ b/sqitch/revert/package_derivations_by_guix_revision_range.sql @@ -0,0 +1,7 @@ +-- Revert guix-data-service:package_derivations_by_guix_revision_range from pg + +BEGIN; + +DROP TABLE package_derivations_by_guix_revision_range; + +COMMIT; diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan index 14a5478..ec87d46 100644 --- a/sqitch/sqitch.plan +++ b/sqitch/sqitch.plan @@ -25,3 +25,4 @@ index_on_load_new_guix_revision_job_events_job_id 2019-09-29T10:39:04Z Christoph fix_null_values_in_git_branches 2019-09-29T11:06:12Z Christopher Baines <mail@cbaines.net> # Fix the NULL values in git_branches add_retry_value_to_job_event_enum 2019-10-02T19:13:52Z Christopher Baines <mail@cbaines.net> # Add retry value to job_event enum remove_guix_revision_duplicates 2019-10-05T08:00:14Z Christopher Baines <mail@cbaines.net> # Remove duplicates in the guix_revisions table +package_derivations_by_guix_revision_range 2019-11-09T19:09:48Z Christopher Baines <mail@cbaines.net> # Add package_derivations_by_guix_revision_range diff --git a/sqitch/verify/package_derivations_by_guix_revision_range.sql b/sqitch/verify/package_derivations_by_guix_revision_range.sql new file mode 100644 index 0000000..149abf6 --- /dev/null +++ b/sqitch/verify/package_derivations_by_guix_revision_range.sql @@ -0,0 +1,7 @@ +-- Verify guix-data-service:package_derivations_by_guix_revision_range on pg + +BEGIN; + +-- XXX Add verifications here. + +ROLLBACK; |