diff options
Diffstat (limited to 'sqitch/deploy/fix_null_values_in_git_branches.sql')
-rw-r--r-- | sqitch/deploy/fix_null_values_in_git_branches.sql | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sqitch/deploy/fix_null_values_in_git_branches.sql b/sqitch/deploy/fix_null_values_in_git_branches.sql new file mode 100644 index 0000000..468d041 --- /dev/null +++ b/sqitch/deploy/fix_null_values_in_git_branches.sql @@ -0,0 +1,11 @@ +-- Deploy guix-data-service:fix_null_values_in_git_branches to pg + +BEGIN; + +ALTER TABLE git_branches DROP CONSTRAINT git_branches_pkey; + +UPDATE git_branches SET commit = '' WHERE commit = 'NULL'; + +ALTER TABLE git_branches ADD PRIMARY KEY (name, commit, git_repository_id, datetime); + +COMMIT; |