aboutsummaryrefslogtreecommitdiff
path: root/sqitch/deploy/fix_null_values_in_git_branches.sql
blob: 468d041b3e7bdd45f69d8403c8e5562eefe6f1bd (plain)
1
2
3
4
5
6
7
8
9
10
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;