aboutsummaryrefslogtreecommitdiff
path: root/sqitch/deploy
diff options
context:
space:
mode:
Diffstat (limited to 'sqitch/deploy')
-rw-r--r--sqitch/deploy/change_git_branches_primary_key.sql9
1 files changed, 9 insertions, 0 deletions
diff --git a/sqitch/deploy/change_git_branches_primary_key.sql b/sqitch/deploy/change_git_branches_primary_key.sql
new file mode 100644
index 0000000..af0ff80
--- /dev/null
+++ b/sqitch/deploy/change_git_branches_primary_key.sql
@@ -0,0 +1,9 @@
+-- Deploy guix-data-service:change_git_branches_primary_key to pg
+
+BEGIN;
+
+ALTER TABLE git_branches DROP CONSTRAINT name_commit;
+
+ALTER TABLE git_branches ADD PRIMARY KEY (name, commit, git_repository_id);
+
+COMMIT;