1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
SET client_min_messages=ERROR;
-- This DB patch will be applied before rollout, and the tables added
-- to their replication set.
CREATE TABLE lp_TeamParticipation
AS SELECT * FROM TeamParticipation WHERE FALSE;
ALTER TABLE lp_TeamParticipation
ADD CONSTRAINT lp_TeamParticipation_pkey PRIMARY KEY (id),
ADD CONSTRAINT lp_TeamPerticipation__team__person__key
UNIQUE (team, person);
CREATE INDEX lp_TeamParticipation__person__idx ON lp_TeamParticipation(person);
CREATE TABLE lp_PersonLocation AS SELECT * FROM PersonLocation WHERE FALSE;
ALTER TABLE lp_PersonLocation
ADD CONSTRAINT lp_PersonLocation_pkey PRIMARY KEY (id),
ADD CONSTRAINT lp_PersonLocation__person__key UNIQUE (person);
CREATE TABLE lp_Person AS SELECT * FROM Person WHERE FALSE;
ALTER TABLE lp_Person
ADD CONSTRAINT lp_Person_pkey PRIMARY KEY (id),
ADD CONSTRAINT lp_Person__name__key UNIQUE (name),
ADD CONSTRAINT lp_Person__account__key UNIQUE (account);
INSERT INTO LaunchpadDatabaseRevision VALUES (2207, 15, 1);
|