launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #24407
[Merge] ~twom/launchpad:drop-not-null-on-git-path into launchpad:master
Tom Wardill has proposed merging ~twom/launchpad:drop-not-null-on-git-path into launchpad:master.
Commit message:
Just drop the NOT NULL on OCIRecipe.git_path
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~twom/launchpad/+git/launchpad/+merge/380047
We can't do this and add the constraint at the same time, it needs a code deploy between.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~twom/launchpad:drop-not-null-on-git-path into launchpad:master.
diff --git a/database/schema/patch-2210-03-0.sql b/database/schema/patch-2210-03-0.sql
new file mode 100644
index 0000000..bd83973
--- /dev/null
+++ b/database/schema/patch-2210-03-0.sql
@@ -0,0 +1,15 @@
+-- Copyright 2019-2020 Canonical Ltd. This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+
+SET client_min_messages=ERROR;
+
+ALTER TABLE DistributionMirror
+ ADD COLUMN https_base_url text,
+ ADD CONSTRAINT distributionmirror_https_base_url_key UNIQUE (https_base_url),
+ ADD CONSTRAINT valid_https_base_url CHECK (valid_absolute_url(https_base_url)),
+ DROP CONSTRAINT one_or_more_urls,
+ 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);
+
+COMMENT ON COLUMN DistributionMirror.https_base_url IS 'The HTTPS URL used to access the mirror.';
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 3, 0);
diff --git a/database/schema/patch-2210-08-4.sql b/database/schema/patch-2210-08-4.sql
new file mode 100644
index 0000000..c2ca3fb
--- /dev/null
+++ b/database/schema/patch-2210-08-4.sql
@@ -0,0 +1,6 @@
+-- Copyright 2020 Canonical Ltd. This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+
+ALTER TABLE OCIRecipe ALTER COLUMN git_path DROP NOT NULL;
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 08, 4);
References