Merge lp:~abrody/launchpad/https-mirror-dbchange into lp:launchpad

Proposed by Andy Brody
Status: Superseded
Proposed branch: lp:~abrody/launchpad/https-mirror-dbchange
Merge into: lp:launchpad
Diff against target: 19 lines (+15/-0)
1 file modified
database/schema/patch-2209-99-0.sql (+15/-0)
To merge this branch: bzr merge lp:~abrody/launchpad/https-mirror-dbchange
Reviewer Review Type Date Requested Status
Colin Watson (community) Needs Resubmitting
Review via email: mp+362640@code.launchpad.net

This proposal has been superseded by a proposal from 2019-02-08.

Description of the change

Add column DistributionMirror.https_base_url, which is needed to add support for listing HTTPS archive and release mirrors.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

This needs to be re-prepared as a branch from lp:launchpad/db-devel, and proposed as a merge into lp:launchpad/db-devel. We can't land database patches against devel directly, except in a few specialised circumstances. Furthermore, the code branch (lp:~abrody/launchpad/https-mirror) may not declare the DB branch as a prerequisite; it must instead be a separate branch that doesn't itself contain the DB changes. This is all because database and code updates are deployed from separate branches; see https://dev.launchpad.net/PolicyAndProcess/DatabaseSchemaChangesProcess.

review: Needs Resubmitting
14017. By Launchpad PQM Bot

[rs=buildbot-poller] automatic merge from stable. Revisions: 18873,
 18874 included.

14018. By Launchpad PQM Bot

[rs=buildbot-poller] automatic merge from stable. Revisions: 18875
 included.

14019. By Launchpad PQM Bot

[rs=buildbot-poller] automatic merge from stable. Revisions: 18876
 included.

14020. By Andy Brody

Add DistributionMirror.https_base_url column.

Unmerged revisions

14020. By Andy Brody

Add DistributionMirror.https_base_url column.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'database/schema/patch-2209-99-0.sql'
2--- database/schema/patch-2209-99-0.sql 1970-01-01 00:00:00 +0000
3+++ database/schema/patch-2209-99-0.sql 2019-02-02 21:36:44 +0000
4@@ -0,0 +1,15 @@
5+-- Copyright 2019 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 DistributionMirror
11+ ADD COLUMN https_base_url text,
12+ ADD CONSTRAINT distributionmirror_https_base_url_key UNIQUE (https_base_url),
13+ ADD CONSTRAINT valid_https_base_url CHECK (valid_absolute_url(https_base_url)),
14+ DROP CONSTRAINT one_or_more_urls,
15+ ADD CONSTRAINT one_or_more_urls CHECK (http_base_url IS NOT NULL OR https_base_url IS NOT NULL OR ftp_base_url IS NOT NULL OR rsync_base_url IS NOT NULL);
16+
17+COMMENT ON COLUMN DistributionMirror.https_base_url IS 'The HTTPS URL used to access the mirror.';
18+
19+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 99, 0);