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
=== modified file 'database/schema/comments.sql'
--- database/schema/comments.sql 2010-02-22 20:58:16 +0000
+++ database/schema/comments.sql 2010-02-23 15:53:16 +0000
@@ -1857,6 +1857,7 @@
1857COMMENT ON COLUMN DistributionMirror.whiteboard IS 'Notes on the current status of the mirror';1857COMMENT ON COLUMN DistributionMirror.whiteboard IS 'Notes on the current status of the mirror';
1858COMMENT ON COLUMN DistributionMirror.date_created IS 'The date and time the mirror was created.';1858COMMENT ON COLUMN DistributionMirror.date_created IS 'The date and time the mirror was created.';
1859COMMENT ON COLUMN DistributionMirror.date_reviewed IS 'The date and time the mirror was reviewed.';1859COMMENT ON COLUMN DistributionMirror.date_reviewed IS 'The date and time the mirror was reviewed.';
1860COMMENT ON COLUMN DistributionMirror.country_dns_mirror IS 'Is the mirror a country DNS mirror?';
18601861
1861-- MirrorDistroArchSeries1862-- MirrorDistroArchSeries
1862COMMENT ON TABLE MirrorDistroArchSeries IS 'The mirror of the packages of a given Distro Arch Release.';1863COMMENT ON TABLE MirrorDistroArchSeries IS 'The mirror of the packages of a given Distro Arch Release.';
18631864
=== added file 'database/schema/patch-2207-23-0.sql'
--- database/schema/patch-2207-23-0.sql 1970-01-01 00:00:00 +0000
+++ database/schema/patch-2207-23-0.sql 2010-02-23 15:53:16 +0000
@@ -0,0 +1,19 @@
1-- Copyright 2010 Canonical Ltd. This software is licensed under the
2-- GNU Affero General Public License version 3 (see the file LICENSE).
3
4SET client_min_messages=ERROR;
5
6ALTER TABLE DistributionMirror
7 ADD COLUMN country_dns_mirror boolean DEFAULT FALSE NOT NULL;
8
9--- Index for country archive mirrors, one per country.
10CREATE UNIQUE INDEX distributionmirror__archive__distribution__country__key
11 ON DistributionMirror(distribution, country, content)
12 WHERE country_dns_mirror IS TRUE AND content = 1;
13
14--- Index for country CD image mirrors, one per country.
15CREATE UNIQUE INDEX distributionmirror__releases__distribution__country__key
16 ON DistributionMirror(distribution, country, content)
17 WHERE country_dns_mirror IS TRUE AND content = 2;
18
19INSERT INTO LaunchpadDatabaseRevision VALUES (2207, 23, 0);

Subscribers

People subscribed via source and target branches

to status/vote changes: