Merge ~twom/launchpad:drop-not-null-on-git-path into launchpad:master

Proposed by Tom Wardill
Status: Superseded
Proposed branch: ~twom/launchpad:drop-not-null-on-git-path
Merge into: launchpad:master
Diff against target: 33 lines (+21/-0)
2 files modified
database/schema/patch-2210-03-0.sql (+15/-0)
database/schema/patch-2210-08-4.sql (+6/-0)
Reviewer Review Type Date Requested Status
Launchpad code reviewers Pending
Review via email: mp+380047@code.launchpad.net

This proposal has been superseded by a proposal from 2020-02-28.

Commit message

Just drop the NOT NULL on OCIRecipe.git_path

Description of the change

We can't do this and add the constraint at the same time, it needs a code deploy between.

To post a comment you must log in.

Unmerged commits

c6ef810... by Tom Wardill

Just drop the NOT NULL on OCIRecipe.git_path

0975e9f... by Tom Wardill

Allow OCIRecipe.git_path to be null and add constraints

b0e4283... by Patch Queue Manager <email address hidden>

Automatic merge from stable up to 570cfa5300ab

98f2d37... by Patch Queue Manager <email address hidden>

Automatic merge from stable up to e0878392dc79

0959d6d... by Patch Queue Manager <email address hidden>

Automatic merge from stable up to 6d551d7844b4

c9dfa9b... by Patch Queue Manager <email address hidden>

Automatic merge from stable up to 299fb27ad847

015757f... by Tom Wardill

Revert "Make git_repository column required in OCIRecipe"

Merged from https://code.launchpad.net/~twom/launchpad/+git/launchpad/+merge/379978

b1038be... by Tom Wardill

Revert "Make git_repository column required in OCIRecipe"

This reverts commit 0d202b5d487579f8b02ed72e603a87f4be867aa5.

ce5c638... by Tom Wardill

Make git_repository column required in OCIRecipe

Merged from https://code.launchpad.net/~twom/launchpad/+git/launchpad/+merge/379960

0d202b5... by Tom Wardill

Make git_repository column required in OCIRecipe

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);
22diff --git a/database/schema/patch-2210-08-4.sql b/database/schema/patch-2210-08-4.sql
23new file mode 100644
24index 0000000..c2ca3fb
25--- /dev/null
26+++ b/database/schema/patch-2210-08-4.sql
27@@ -0,0 +1,6 @@
28+-- Copyright 2020 Canonical Ltd. This software is licensed under the
29+-- GNU Affero General Public License version 3 (see the file LICENSE).
30+
31+ALTER TABLE OCIRecipe ALTER COLUMN git_path DROP NOT NULL;
32+
33+INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 08, 4);

Subscribers

People subscribed via source and target branches

to status/vote changes: