diff options
author | Christopher Baines <mail@cbaines.net> | 2020-02-16 22:28:37 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-02-16 22:28:37 +0000 |
commit | e5a6680808696c940755a50ad9fc51e4d74c1af3 (patch) | |
tree | 7ab54782c1b2756a0bf376bd48336e1be31b39ef /sqitch | |
parent | bfa468a325fda5ef5a32e8304b544d2547b6c9a7 (diff) | |
download | data-service-e5a6680808696c940755a50ad9fc51e4d74c1af3.tar data-service-e5a6680808696c940755a50ad9fc51e4d74c1af3.tar.gz |
Make a constraint deferrable
To allow for deferring it in a transaction when deleting derivations.
Diffstat (limited to 'sqitch')
-rw-r--r-- | sqitch/deploy/make_some_constraints_deferrable.sql | 8 | ||||
-rw-r--r-- | sqitch/revert/make_some_constraints_deferrable.sql | 7 | ||||
-rw-r--r-- | sqitch/sqitch.plan | 1 | ||||
-rw-r--r-- | sqitch/verify/make_some_constraints_deferrable.sql | 7 |
4 files changed, 23 insertions, 0 deletions
diff --git a/sqitch/deploy/make_some_constraints_deferrable.sql b/sqitch/deploy/make_some_constraints_deferrable.sql new file mode 100644 index 0000000..af03544 --- /dev/null +++ b/sqitch/deploy/make_some_constraints_deferrable.sql @@ -0,0 +1,8 @@ +-- Deploy guix-data-service:make_some_constraints_deferrable to pg + +BEGIN; + +ALTER TABLE derivations_by_output_details_set + ALTER CONSTRAINT derivations_by_output_details_set_derivation_id_fkey DEFERRABLE INITIALLY IMMEDIATE; + +COMMIT; diff --git a/sqitch/revert/make_some_constraints_deferrable.sql b/sqitch/revert/make_some_constraints_deferrable.sql new file mode 100644 index 0000000..5e0a629 --- /dev/null +++ b/sqitch/revert/make_some_constraints_deferrable.sql @@ -0,0 +1,7 @@ +-- Revert guix-data-service:make_some_constraints_deferrable from pg + +BEGIN; + +-- XXX Add DDLs here. + +COMMIT; diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan index 14a580c..891d595 100644 --- a/sqitch/sqitch.plan +++ b/sqitch/sqitch.plan @@ -51,3 +51,4 @@ change_package_derivations_by_guix_revision_range_target 2020-02-08T10:13:07Z Ch allow_including_and_excluding_branches_for_repositories 2020-02-08T11:30:02Z Christopher Baines <mail@cbaines.net> # Allow including and excluding branches for repositories channel_instance_derivations 2020-02-10T07:59:03Z Christopher Baines <mail@cbaines.net> # Add tables to store derivations for channel instances update_build_servers_build_config 2020-02-13T20:07:19Z Christopher Baines <mail@cbaines.net> # Update build_servers_build_config values +make_some_constraints_deferrable 2020-02-16T10:54:22Z Christopher Baines <mail@cbaines.net> # Make some constraints deferrable diff --git a/sqitch/verify/make_some_constraints_deferrable.sql b/sqitch/verify/make_some_constraints_deferrable.sql new file mode 100644 index 0000000..51b13a7 --- /dev/null +++ b/sqitch/verify/make_some_constraints_deferrable.sql @@ -0,0 +1,7 @@ +-- Verify guix-data-service:make_some_constraints_deferrable on pg + +BEGIN; + +-- XXX Add verifications here. + +ROLLBACK; |