launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #31140
[Merge] ~ines-almeida/launchpad:db-snap-pro-enable-constraints into launchpad:db-devel
Ines Almeida has proposed merging ~ines-almeida/launchpad:db-snap-pro-enable-constraints into launchpad:db-devel.
Commit message:
Re-add "db: add NOT NULL constraint to Snap.pro_enable column"
This re-adds commit c30bd66a4cda8769f3e535140f2e389d7856128f after it was reverted by 12c80df41ce00e550d6ea8ee296fedc3715940ef
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/466805
See this MP for context: https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/466796
This MP is re-adding what was reverted, after the db-devel branch was brought up-to-date with master.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad:db-snap-pro-enable-constraints into launchpad:db-devel.
diff --git a/database/schema/patch-2211-24-0.sql b/database/schema/patch-2211-24-0.sql
new file mode 100644
index 0000000..3aafba3
--- /dev/null
+++ b/database/schema/patch-2211-24-0.sql
@@ -0,0 +1,9 @@
+-- Copyright 2023 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 Snap
+ ALTER COLUMN pro_enable SET NOT NULL;
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2211, 24, 0);
References