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

Proposed by Andy Brody on 2019-02-08
Status: Rejected
Rejected by: Colin Watson on 2020-03-27
Proposed branch: lp:~abrody/launchpad/https-mirror-dbchange
Merge into: lp:launchpad/db-devel
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 2019-02-08 Approve on 2019-04-13
Review via email:

This proposal supersedes a proposal from 2019-02-02.

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.
Colin Watson (cjwatson) wrote : Posted in a previous version of this proposal

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

review: Resubmit
Andy Brody (abrody) wrote :

Thanks for the explanation, resubmitted.

Colin Watson (cjwatson) wrote :

This looks OK. I've allocated patch number 2210-03-0 for you, so please renumber this to use that.

review: Approve
Colin Watson (cjwatson) wrote :

Thiago picked this up in, which is now on production.

Unmerged revisions

14020. By Andy Brody on 2019-02-08

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-08 06:52:29 +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).
8+SET client_min_messages=ERROR;
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);
17+COMMENT ON COLUMN DistributionMirror.https_base_url IS 'The HTTPS URL used to access the mirror.';
19+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 99, 0);


People subscribed via source and target branches

to status/vote changes: