← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~ines-almeida/launchpad:pro-enable-migration-cleanup-revert into launchpad:db-devel

 

Ines Almeida has proposed merging ~ines-almeida/launchpad:pro-enable-migration-cleanup-revert into launchpad:db-devel.

Commit message:
Revert "db: add NOT NULL constraint to Snap.pro_enable column"
    
This reverts commit c30bd66a4cda8769f3e535140f2e389d7856128f.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/466796

In a lot of cases, we want to merge the DB changes before the model changes.
That wasn't the case here where we needed to propagate the model changes, and only then make sure that the not-null restriction is set in at a DB level.

The reason for this revert: I need to get the changes from master merged into db-devel for the buildbot to be able to run the tests. The cleanest way to do that (IMO) will be to revert this change, let the automatic merge happen, then merge this change again.

Reverting this MP: https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/457147
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad:pro-enable-migration-cleanup-revert into launchpad:db-devel.
diff --git a/database/schema/patch-2211-24-0.sql b/database/schema/patch-2211-24-0.sql
deleted file mode 100644
index 3aafba3..0000000
--- a/database/schema/patch-2211-24-0.sql
+++ /dev/null
@@ -1,9 +0,0 @@
--- 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);