Merge lp://staging/~jpds/launchpad/fix_361650_schema_changes into lp://staging/launchpad/db-devel

Proposed by Jonathan Davies
Status: Merged
Approved by: Curtis Hovey
Approved revision: no longer in the source branch.
Merged at revision: 9029
Proposed branch: lp://staging/~jpds/launchpad/fix_361650_schema_changes
Merge into: lp://staging/launchpad/db-devel
Diff against target: 35 lines (+20/-0)
2 files modified
database/schema/comments.sql (+1/-0)
database/schema/patch-2207-23-0.sql (+19/-0)
To merge this branch: bzr merge lp://staging/~jpds/launchpad/fix_361650_schema_changes
Reviewer Review Type Date Requested Status
Curtis Hovey (community) Approve
Review via email: mp+19977@code.staging.launchpad.net

Commit message

Made schema changes to DistributionMirror to add a country_dns_mirror column.

To post a comment you must log in.
Revision history for this message
Jonathan Davies (jpds) wrote :

= Summary =

This branch introduces the schema changes needed to introduce country mirrors into Launchpad as per bug #361650.

Revision history for this message
Curtis Hovey (sinzui) wrote :

Thanks for extracting the approved schema changes from the older review to this branch so that they can be landed now

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'database/schema/comments.sql'
2--- database/schema/comments.sql 2010-02-22 20:58:16 +0000
3+++ database/schema/comments.sql 2010-02-23 15:53:16 +0000
4@@ -1857,6 +1857,7 @@
5 COMMENT ON COLUMN DistributionMirror.whiteboard IS 'Notes on the current status of the mirror';
6 COMMENT ON COLUMN DistributionMirror.date_created IS 'The date and time the mirror was created.';
7 COMMENT ON COLUMN DistributionMirror.date_reviewed IS 'The date and time the mirror was reviewed.';
8+COMMENT ON COLUMN DistributionMirror.country_dns_mirror IS 'Is the mirror a country DNS mirror?';
9
10 -- MirrorDistroArchSeries
11 COMMENT ON TABLE MirrorDistroArchSeries IS 'The mirror of the packages of a given Distro Arch Release.';
12
13=== added file 'database/schema/patch-2207-23-0.sql'
14--- database/schema/patch-2207-23-0.sql 1970-01-01 00:00:00 +0000
15+++ database/schema/patch-2207-23-0.sql 2010-02-23 15:53:16 +0000
16@@ -0,0 +1,19 @@
17+-- Copyright 2010 Canonical Ltd. This software is licensed under the
18+-- GNU Affero General Public License version 3 (see the file LICENSE).
19+
20+SET client_min_messages=ERROR;
21+
22+ALTER TABLE DistributionMirror
23+ ADD COLUMN country_dns_mirror boolean DEFAULT FALSE NOT NULL;
24+
25+--- Index for country archive mirrors, one per country.
26+CREATE UNIQUE INDEX distributionmirror__archive__distribution__country__key
27+ ON DistributionMirror(distribution, country, content)
28+ WHERE country_dns_mirror IS TRUE AND content = 1;
29+
30+--- Index for country CD image mirrors, one per country.
31+CREATE UNIQUE INDEX distributionmirror__releases__distribution__country__key
32+ ON DistributionMirror(distribution, country, content)
33+ WHERE country_dns_mirror IS TRUE AND content = 2;
34+
35+INSERT INTO LaunchpadDatabaseRevision VALUES (2207, 23, 0);

Subscribers

People subscribed via source and target branches

to status/vote changes: