SET search_path=revision,public;

DROP INDEX IF EXISTS one_open_branch_idx;
DROP INDEX IF EXISTS branch_type_idx;

CREATE UNIQUE INDEX one_open_branch_idx ON branch USING btree (type) WHERE finished_by=0;
CREATE INDEX branch_type_idx ON branch USING btree (type);

SET search_path=public;
