aboutsummaryrefslogtreecommitdiff
path: root/sqitch
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-05-12 17:01:51 +0100
committerChristopher Baines <mail@cbaines.net>2019-05-12 18:08:17 +0100
commit8eac26b17d996e3e171c92e43536333daf72b7c9 (patch)
tree72cd6fdf496b4bb5b1c21713fe4395d0dc429623 /sqitch
parent0ab1c71722e81404972f80c91c9717e429d03ec3 (diff)
downloaddata-service-8eac26b17d996e3e171c92e43536333daf72b7c9.tar
data-service-8eac26b17d996e3e171c92e43536333daf72b7c9.tar.gz
Remove the sha1_hash from the package_metadata table
I'm thinking about adding more fields to this table, and the sha1_hash values will make this tricker. Therefore, remove the value, and adjust the existing code to cope. This commit also adds a new test which coveres some of the changed functionality.
Diffstat (limited to 'sqitch')
-rw-r--r--sqitch/deploy/remove_package_metadata_sha1_hash.sql7
-rw-r--r--sqitch/revert/remove_package_metadata_sha1_hash.sql7
-rw-r--r--sqitch/sqitch.plan1
-rw-r--r--sqitch/verify/remove_package_metadata_sha1_hash.sql7
4 files changed, 22 insertions, 0 deletions
diff --git a/sqitch/deploy/remove_package_metadata_sha1_hash.sql b/sqitch/deploy/remove_package_metadata_sha1_hash.sql
new file mode 100644
index 0000000..f0bb286
--- /dev/null
+++ b/sqitch/deploy/remove_package_metadata_sha1_hash.sql
@@ -0,0 +1,7 @@
+-- Deploy guix-data-service:remove_package_metadata_sha1_hash to pg
+
+BEGIN;
+
+ALTER TABLE package_metadata DROP COLUMN sha1_hash;
+
+COMMIT;
diff --git a/sqitch/revert/remove_package_metadata_sha1_hash.sql b/sqitch/revert/remove_package_metadata_sha1_hash.sql
new file mode 100644
index 0000000..d2059dc
--- /dev/null
+++ b/sqitch/revert/remove_package_metadata_sha1_hash.sql
@@ -0,0 +1,7 @@
+-- Revert guix-data-service:remove_package_metadata_sha1_hash from pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan
index 9e1c540..026aa7f 100644
--- a/sqitch/sqitch.plan
+++ b/sqitch/sqitch.plan
@@ -7,3 +7,4 @@ buildstatus_enum [appschema] 2019-04-13T11:56:37Z Christopher Baines <mail@cbain
initial_import 2019-04-13T13:06:28Z Christopher Baines <mail@cbaines.net> # Import the manually managed database schema
git_repositories 2019-05-04T19:03:38Z Christopher Baines <mail@cbaines.net> # Add a git_repositories table
git_branches 2019-05-05T14:53:12Z Christopher Baines <mail@cbaines.net> # Add a git_branches table
+remove_package_metadata_sha1_hash 2019-05-12T10:37:40Z Christopher Baines <mail@cbaines.net> # Remove the sha1_hash field from package_metadata
diff --git a/sqitch/verify/remove_package_metadata_sha1_hash.sql b/sqitch/verify/remove_package_metadata_sha1_hash.sql
new file mode 100644
index 0000000..4118a6e
--- /dev/null
+++ b/sqitch/verify/remove_package_metadata_sha1_hash.sql
@@ -0,0 +1,7 @@
+-- Verify guix-data-service:remove_package_metadata_sha1_hash on pg
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;