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

Proposed by Andy Brody
Status: Rejected
Rejected by: Colin Watson
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 (community) Approve
Review via email: mp+362902@code.launchpad.net

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.
Revision history for this message
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 https://dev.launchpad.net/PolicyAndProcess/DatabaseSchemaChangesProcess.

review: Needs Resubmitting
Revision history for this message
Andy Brody (abrody) wrote :

Thanks for the explanation, resubmitted.

Revision history for this message
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
Revision history for this message
Colin Watson (cjwatson) wrote :

Thiago picked this up in https://code.launchpad.net/~pappacena/launchpad/+git/launchpad/+merge/379504, which is now on production.

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-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).
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);

Subscribers

People subscribed via source and target branches

to status/vote changes: