← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:db-bpr-format-specific-name-constraint into launchpad:db-devel

 

Colin Watson has proposed merging ~cjwatson/launchpad:db-bpr-format-specific-name-constraint into launchpad:db-devel.

Commit message:
Drop valid_name constraint on BinaryPackageName.name

Requested reviews:
  William Grant (wgrant): db
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/425182

https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/425180 does an equivalent check in `BinaryPackageRelease.__init__` instead, allowing the constraint to depend on the binary package format.

This branch must not be landed until https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/425180 has been deployed to production.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:db-bpr-format-specific-name-constraint into launchpad:db-devel.
diff --git a/database/schema/patch-2210-44-3.sql b/database/schema/patch-2210-44-3.sql
new file mode 100644
index 0000000..3e41f11
--- /dev/null
+++ b/database/schema/patch-2210-44-3.sql
@@ -0,0 +1,9 @@
+-- Copyright 2022 Canonical Ltd.  This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+
+SET client_min_messages=ERROR;
+
+-- Replaced by format-specific validation in BinaryPackageRelease.__init__.
+ALTER TABLE BinaryPackageName DROP CONSTRAINT valid_name;
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 44, 3);