aboutsummaryrefslogtreecommitdiff
path: root/sqitch
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-01-11 17:25:08 +0000
committerChristopher Baines <mail@cbaines.net>2020-01-11 17:25:08 +0000
commit2f36d47b1b5540ab157d561cea4eb1afc1aec7e7 (patch)
tree1dca3f979edc0f2fa17403d10e3e3e2797ed55f5 /sqitch
parent57cbac891e6771677b0f5ca906c32e5c5dff701d (diff)
downloaddata-service-2f36d47b1b5540ab157d561cea4eb1afc1aec7e7.tar
data-service-2f36d47b1b5540ab157d561cea4eb1afc1aec7e7.tar.gz
Don't hardcode the expected x-git-repo header value
Rather than expecting it always to be "guix", store the expected value in the database, and use the value of the header to find the relevant repository.
Diffstat (limited to 'sqitch')
-rw-r--r--sqitch/deploy/git-repositories-x-git-repo-header.sql7
-rw-r--r--sqitch/revert/git-repositories-x-git-repo-header.sql7
-rw-r--r--sqitch/sqitch.plan1
-rw-r--r--sqitch/verify/git-repositories-x-git-repo-header.sql7
4 files changed, 22 insertions, 0 deletions
diff --git a/sqitch/deploy/git-repositories-x-git-repo-header.sql b/sqitch/deploy/git-repositories-x-git-repo-header.sql
new file mode 100644
index 0000000..9a77928
--- /dev/null
+++ b/sqitch/deploy/git-repositories-x-git-repo-header.sql
@@ -0,0 +1,7 @@
+-- Deploy guix-data-service:git-repositories-x-git-repo-header to pg
+
+BEGIN;
+
+ALTER TABLE git_repositories ADD COLUMN x_git_repo_header varchar;
+
+COMMIT;
diff --git a/sqitch/revert/git-repositories-x-git-repo-header.sql b/sqitch/revert/git-repositories-x-git-repo-header.sql
new file mode 100644
index 0000000..606ca61
--- /dev/null
+++ b/sqitch/revert/git-repositories-x-git-repo-header.sql
@@ -0,0 +1,7 @@
+-- Revert guix-data-service:git-repositories-x-git-repo-header from pg
+
+BEGIN;
+
+ALTER TABLE git_repositories DROP COLUMN x_git_repo_header;
+
+COMMIT;
diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan
index b981cc0..8f960e6 100644
--- a/sqitch/sqitch.plan
+++ b/sqitch/sqitch.plan
@@ -42,3 +42,4 @@ derivations_hash_index 2019-12-24T22:54:19Z Christopher Baines <mail@cbaines.net
add_derivation_source_file_nars 2019-12-28T20:37:06Z Christopher Baines <mail@cbaines.net> # Add table for derivation source file nars
derivation_source_files_store_path_hash_index 2019-12-29T17:53:08Z Christopher Baines <mail@cbaines.net> # Add index on the hash part of the derivation source files store path
build_servers_build_config 2020-01-05T12:06:13Z Christopher Baines <mail@cbaines.net> # Add build_servers_build_config table
+git-repositories-x-git-repo-header 2020-01-11T16:39:32Z Christopher Baines <mail@cbaines.net> # Add x_git_repo_header to git_repositories
diff --git a/sqitch/verify/git-repositories-x-git-repo-header.sql b/sqitch/verify/git-repositories-x-git-repo-header.sql
new file mode 100644
index 0000000..2f448e3
--- /dev/null
+++ b/sqitch/verify/git-repositories-x-git-repo-header.sql
@@ -0,0 +1,7 @@
+-- Verify guix-data-service:git-repositories-x-git-repo-header on pg
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;