~launchpad-pqm/launchpad/devel

7675.395.145 by Stuart Bishop
The db patch might help...
1
SET client_min_messages=ERROR;
2
7675.395.146 by Stuart Bishop
Drop foreign key constraint on lp_OpenIdIdentifier table - insertion order can cause it to break when it points to lp_Person, and lp_account is deprecated
3
CREATE TABLE lp_OpenIdIdentifier (
7675.395.145 by Stuart Bishop
The db patch might help...
4
    identifier text PRIMARY KEY,
7675.395.146 by Stuart Bishop
Drop foreign key constraint on lp_OpenIdIdentifier table - insertion order can cause it to break when it points to lp_Person, and lp_account is deprecated
5
    account    integer NOT NULL,
7675.395.145 by Stuart Bishop
The db patch might help...
6
    date_created timestamp without time zone NOT NULL);
7
8
INSERT INTO lp_OpenIdIdentifier (identifier, account, date_created)
9
SELECT identifier, account, date_created FROM OpenIdIdentifier
10
WHERE identifier NOT IN (SELECT identifier FROM lp_OpenIdIdentifier);
11
7675.395.146 by Stuart Bishop
Drop foreign key constraint on lp_OpenIdIdentifier table - insertion order can cause it to break when it points to lp_Person, and lp_account is deprecated
12
CREATE INDEX lp_openididentifier__account__idx
13
ON lp_OpenIdIdentifier(account);
7675.395.145 by Stuart Bishop
The db patch might help...
14
15
INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 21, 0);