Merge ~pappacena/launchpad:db-patch-https-mirrors into launchpad:db-devel

Proposed by Thiago F. Pappacena on 2020-02-19
Status: Merged
Approved by: Thiago F. Pappacena on 2020-02-26
Approved revision: 7a73d9015ba7b4405f8884342b219ba058dad7c7
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~pappacena/launchpad:db-patch-https-mirrors
Merge into: launchpad:db-devel
Diff against target: 21 lines (+15/-0)
1 file modified
database/schema/patch-2210-03-0.sql (+15/-0)
Reviewer Review Type Date Requested Status
Colin Watson db 2020-02-19 Approve on 2020-02-21
Review via email: mp+379504@code.launchpad.net

Commit message

Database patch to support HTTPS mirrors

To post a comment you must log in.
Colin Watson (cjwatson) :
7a73d90... by Thiago F. Pappacena on 2020-02-20

renaming HTTPS mirrors patch number (previously allocated already)

Thiago F. Pappacena (pappacena) wrote :

Renamed db patch version to the pre-allocated number 2210-03-0.

Colin Watson (cjwatson) :
review: Approve (db)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/database/schema/patch-2210-03-0.sql b/database/schema/patch-2210-03-0.sql
2new file mode 100644
3index 0000000..bd83973
4--- /dev/null
5+++ b/database/schema/patch-2210-03-0.sql
6@@ -0,0 +1,15 @@
7+-- Copyright 2019-2020 Canonical Ltd. This software is licensed under the
8+-- GNU Affero General Public License version 3 (see the file LICENSE).
9+
10+SET client_min_messages=ERROR;
11+
12+ALTER TABLE DistributionMirror
13+ ADD COLUMN https_base_url text,
14+ ADD CONSTRAINT distributionmirror_https_base_url_key UNIQUE (https_base_url),
15+ ADD CONSTRAINT valid_https_base_url CHECK (valid_absolute_url(https_base_url)),
16+ DROP CONSTRAINT one_or_more_urls,
17+ 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);
18+
19+COMMENT ON COLUMN DistributionMirror.https_base_url IS 'The HTTPS URL used to access the mirror.';
20+
21+INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 3, 0);

Subscribers

People subscribed via source and target branches