Merge lp:~wgrant/launchpad/accesspolicy-fks into lp:launchpad/db-devel

Proposed by William Grant
Status: Merged
Approved by: Stuart Bishop
Approved revision: no longer in the source branch.
Merged at revision: 11465
Proposed branch: lp:~wgrant/launchpad/accesspolicy-fks
Merge into: lp:launchpad/db-devel
Diff against target: 19 lines (+15/-0)
1 file modified
database/schema/patch-2209-11-5.sql (+15/-0)
To merge this branch: bzr merge lp:~wgrant/launchpad/accesspolicy-fks
Reviewer Review Type Date Requested Status
Stuart Bishop (community) db Approve
Review via email: mp+98548@code.launchpad.net

Commit message

Add missing Person foreign keys to AccessArtifactGrant and AccessPolicyGrant.

Description of the change

This branch adds foreign keys from AccessPolicyGrant and AccessArtifactGrant to Person. They were omitted from the original branch due to the deployment sequencing constraints surrounding person merging.

To post a comment you must log in.
Revision history for this message
Stuart Bishop (stub) wrote :

iz good.

review: Approve (db)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'database/schema/patch-2209-11-5.sql'
2--- database/schema/patch-2209-11-5.sql 1970-01-01 00:00:00 +0000
3+++ database/schema/patch-2209-11-5.sql 2012-03-21 00:59:21 +0000
4@@ -0,0 +1,15 @@
5+-- Copyright 2012 Canonical Ltd. This software is licensed under the
6+-- GNU Affero General Public License version 3 (see the file LICENSE).
7+
8+SET client_min_messages=ERROR;
9+
10+ALTER TABLE AccessArtifactGrant ADD CONSTRAINT
11+ accessartifactgrant__grantee__fk FOREIGN KEY (grantee) REFERENCES Person;
12+ALTER TABLE AccessArtifactGrant ADD CONSTRAINT
13+ accessartifactgrant__grantor__fk FOREIGN KEY (grantor) REFERENCES Person;
14+ALTER TABLE AccessPolicyGrant ADD CONSTRAINT
15+ accesspolicygrant__grantee__fk FOREIGN KEY (grantee) REFERENCES Person;
16+ALTER TABLE AccessPolicyGrant ADD CONSTRAINT
17+ accesspolicygrant__grantor__fk FOREIGN KEY (grantor) REFERENCES Person;
18+
19+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 11, 5);

Subscribers

People subscribed via source and target branches

to status/vote changes: