aboutsummaryrefslogtreecommitdiff
path: root/sqitch
diff options
context:
space:
mode:
Diffstat (limited to 'sqitch')
-rw-r--r--sqitch/deploy/channel_instance_derivations.sql13
-rw-r--r--sqitch/revert/channel_instance_derivations.sql7
-rw-r--r--sqitch/sqitch.plan1
-rw-r--r--sqitch/verify/channel_instance_derivations.sql7
4 files changed, 28 insertions, 0 deletions
diff --git a/sqitch/deploy/channel_instance_derivations.sql b/sqitch/deploy/channel_instance_derivations.sql
new file mode 100644
index 0000000..bb8e6e3
--- /dev/null
+++ b/sqitch/deploy/channel_instance_derivations.sql
@@ -0,0 +1,13 @@
+-- Deploy guix-data-service:channel_instance_derivations to pg
+
+BEGIN;
+
+CREATE TABLE channel_instances (
+ guix_revision_id integer NOT NULL REFERENCES guix_revisions(id),
+ system varchar NOT NULL,
+ derivation_id integer NOT NULL REFERENCES derivations (id),
+ PRIMARY KEY (guix_revision_id, system),
+ UNIQUE (derivation_id)
+);
+
+COMMIT;
diff --git a/sqitch/revert/channel_instance_derivations.sql b/sqitch/revert/channel_instance_derivations.sql
new file mode 100644
index 0000000..42cc943
--- /dev/null
+++ b/sqitch/revert/channel_instance_derivations.sql
@@ -0,0 +1,7 @@
+-- Revert guix-data-service:channel_instance_derivations from pg
+
+BEGIN;
+
+DROP TABLE channel_instances;
+
+COMMIT;
diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan
index 6eabcc1..e21306b 100644
--- a/sqitch/sqitch.plan
+++ b/sqitch/sqitch.plan
@@ -49,3 +49,4 @@ remove_old_cross_derivations 2020-02-07T19:42:54Z Christopher Baines <mail@cbain
increase_fillfactor_for_some_indexes 2020-02-07T20:49:17Z Christopher Baines <mail@cbaines.net> # Increase the fillfactor for some btree indexes
change_package_derivations_by_guix_revision_range_target 2020-02-08T10:13:07Z Christopher Baines <mail@cbaines.net> # Change the values for package_derivations_by_guix_revision_range target
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
diff --git a/sqitch/verify/channel_instance_derivations.sql b/sqitch/verify/channel_instance_derivations.sql
new file mode 100644
index 0000000..50511cb
--- /dev/null
+++ b/sqitch/verify/channel_instance_derivations.sql
@@ -0,0 +1,7 @@
+-- Verify guix-data-service:channel_instance_derivations on pg
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;