Merge ~ines-almeida/launchpad:db-snap-pro-enable-constraints into launchpad:db-devel

Proposed by Ines Almeida
Status: Needs review
Proposed branch: ~ines-almeida/launchpad:db-snap-pro-enable-constraints
Merge into: launchpad:db-devel
Diff against target: 15 lines (+9/-0)
1 file modified
database/schema/patch-2211-24-0.sql (+9/-0)
Reviewer Review Type Date Requested Status
William Grant db Pending
Launchpad code reviewers Pending
Review via email: mp+457147@code.launchpad.net

Commit message

db: add NOT NULL constraint to Snap.pro_enable column

Description of the change

This is the first part of the cleanup needed after the Snap.pro_enable migration which is now finished in production.

See https://warthogs.atlassian.net/browse/LP-1350

To post a comment you must log in.

Unmerged commits

c30bd66... by Ines Almeida

db: add NOT NULL constraint to Snap.pro_enable column

Succeeded
[SUCCEEDED] docs:0 (build)
[SUCCEEDED] lint:0 (build)
[SUCCEEDED] mypy:0 (build)
13 of 3 results

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/database/schema/patch-2211-24-0.sql b/database/schema/patch-2211-24-0.sql
2new file mode 100644
3index 0000000..3aafba3
4--- /dev/null
5+++ b/database/schema/patch-2211-24-0.sql
6@@ -0,0 +1,9 @@
7+-- Copyright 2023 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 Snap
13+ ALTER COLUMN pro_enable SET NOT NULL;
14+
15+INSERT INTO LaunchpadDatabaseRevision VALUES (2211, 24, 0);

Subscribers

People subscribed via source and target branches

to status/vote changes: