diff options
author | Christopher Baines <mail@cbaines.net> | 2019-08-05 20:02:06 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-08-05 20:02:06 +0100 |
commit | f553a7490d215edf0d093bf4b5eee6c23440e916 (patch) | |
tree | 75e83575816ce7ddf8b1cfab2b8948fcaa3628a7 /sqitch/deploy | |
parent | 4b59108fdd320d32378cd1f31e9f394af52122ea (diff) | |
download | data-service-f553a7490d215edf0d093bf4b5eee6c23440e916.tar data-service-f553a7490d215edf0d093bf4b5eee6c23440e916.tar.gz |
Change the git_branches table primary key
To allow for having branches in multiple git repositories.
Diffstat (limited to 'sqitch/deploy')
-rw-r--r-- | sqitch/deploy/change_git_branches_primary_key.sql | 9 |
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; |