From f553a7490d215edf0d093bf4b5eee6c23440e916 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 5 Aug 2019 20:02:06 +0100 Subject: Change the git_branches table primary key To allow for having branches in multiple git repositories. --- sqitch/deploy/change_git_branches_primary_key.sql | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 sqitch/deploy/change_git_branches_primary_key.sql (limited to 'sqitch/deploy') 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; -- cgit v1.2.3