~launchpad-pqm/launchpad/devel

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
SET client_min_messages=ERROR;

--Create new visible column on message.
ALTER TABLE Message
    ADD COLUMN visible BOOLEAN NOT NULL DEFAULT TRUE;

--Migrate the data, rebuilding indexes afterwards.
UPDATE Message SET visible = FALSE
    FROM BugMessage
    WHERE BugMessage.message = Message.id AND BugMessage.visible IS FALSE;
CLUSTER Message USING message_pkey;

--And kill the old column
ALTER TABLE BugMessage
    DROP COLUMN visible;

--Per patch adding reqs
INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 51, 0);