aboutsummaryrefslogtreecommitdiff
path: root/sqitch
diff options
context:
space:
mode:
Diffstat (limited to 'sqitch')
-rw-r--r--sqitch/deploy/change_derivation_source_file_nars_constraint.sql13
-rw-r--r--sqitch/revert/change_derivation_source_file_nars_constraint.sql7
-rw-r--r--sqitch/sqitch.plan1
-rw-r--r--sqitch/verify/change_derivation_source_file_nars_constraint.sql7
4 files changed, 28 insertions, 0 deletions
diff --git a/sqitch/deploy/change_derivation_source_file_nars_constraint.sql b/sqitch/deploy/change_derivation_source_file_nars_constraint.sql
new file mode 100644
index 0000000..b8e96a2
--- /dev/null
+++ b/sqitch/deploy/change_derivation_source_file_nars_constraint.sql
@@ -0,0 +1,13 @@
+-- Deploy guix-data-service:change_derivation_source_file_nars_constraint to pg
+
+BEGIN;
+
+ALTER TABLE derivation_source_file_nars
+ DROP CONSTRAINT derivation_source_file_nars_derivation_source_file_id_fkey;
+
+ALTER TABLE derivation_source_file_nars
+ ADD CONSTRAINT derivation_source_file_nars_derivation_source_file_id_fkey
+ FOREIGN KEY (derivation_source_file_id) REFERENCES derivation_source_files(id)
+ ON DELETE CASCADE;
+
+COMMIT;
diff --git a/sqitch/revert/change_derivation_source_file_nars_constraint.sql b/sqitch/revert/change_derivation_source_file_nars_constraint.sql
new file mode 100644
index 0000000..a2143f8
--- /dev/null
+++ b/sqitch/revert/change_derivation_source_file_nars_constraint.sql
@@ -0,0 +1,7 @@
+-- Revert guix-data-service:change_derivation_source_file_nars_constraint from pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan
index 95d0392..09df4bb 100644
--- a/sqitch/sqitch.plan
+++ b/sqitch/sqitch.plan
@@ -70,3 +70,4 @@ add-tsvectors-per-locale 2020-07-16T18:19:44Z daniela <daniela@linux-ijv5> # Add
change_package_descriptions_index 2020-08-23T11:56:00Z Christopher Baines <mail@cbaines.net> # Change the package_descriptions index
change_locale_values 2020-09-26T10:20:22Z Christopher Baines <mail@cbaines.net> # Change locale values
change_autovacuum_config 2020-10-01T21:24:46Z Christopher Baines <mail@cbaines.net> # Change autovacuum config
+change_derivation_source_file_nars_constraint 2020-10-02T17:12:58Z Christopher Baines <mail@cbaines.net> # Change derivation source file nars constraint
diff --git a/sqitch/verify/change_derivation_source_file_nars_constraint.sql b/sqitch/verify/change_derivation_source_file_nars_constraint.sql
new file mode 100644
index 0000000..7c00429
--- /dev/null
+++ b/sqitch/verify/change_derivation_source_file_nars_constraint.sql
@@ -0,0 +1,7 @@
+-- Verify guix-data-service:change_derivation_source_file_nars_constraint on pg
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;