2
* Adds the explicit branch type to the branch table.
5
SET client_min_messages=ERROR;
7
ALTER TABLE Branch ADD COLUMN branch_type INT;
10
SET branch_type = 3 -- IMPORTED
13
WHERE name = 'vcs-imports');
16
SET branch_type = 2 -- MIRRORED
18
AND branch_type IS NULL;
21
SET branch_type = 1 -- HOSTED
22
WHERE branch_type IS NULL;
24
ALTER TABLE Branch ALTER branch_type SET DEFAULT 0;
25
ALTER TABLE Branch ALTER branch_type SET NOT NULL;
28
ADD CONSTRAINT branch_type_url_consistent
29
CHECK ((branch_type = 2 AND url IS NOT NULL) OR url IS NULL);
31
INSERT INTO LaunchpadDatabaseRevision VALUES (87, 31, 0);