feat: add migration for enable_academies default value change (ENT-11220)#2597
Merged
iloveagent57 merged 1 commit intoApr 15, 2026
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2597 +/- ##
=======================================
Coverage 85.91% 85.91%
=======================================
Files 250 250
Lines 16604 16604
Branches 1639 1639
=======================================
Hits 14266 14266
Misses 2001 2001
Partials 337 337
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
you don't need a data migration, you just need a migration for the model change you have (in the previous PR) that changes the default value. if you open a fresh branch off of master and run |
980851c to
7720208
Compare
…220) Follow-up to openedx#2594. The model default for enable_academies was changed from False to True in that PR, but no corresponding migration was generated. This adds the AlterField migration that Django's makemigrations produces for that change.
7720208 to
1615840
Compare
iloveagent57
approved these changes
Apr 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Follow-up to #2594.
PR #2594 changed the
enable_academiesmodel default fromFalsetoTruebut did not include the corresponding Django migration thatmakemigrationsgenerates for adefault=change. This PR adds that missingAlterFieldmigration so Django's migration graph stays in sync with the model state.What Changed
enterprise/migrations/0245_alter_enterprisecustomer_enable_academies_and_more.py— generated by./manage.py makemigrations enterpriseafter the model default was flipped in #2594.AlterFieldonenterprisecustomer.enable_academies→default=TrueAlterFieldonhistoricalenterprisecustomer.enable_academies→default=TrueNo data migration is needed — PR #2594 already handled existing customers with search enabled via
0244_enable_academies_for_existing_customers.Related
Test plan
./manage.py migrate enterpriseand verify the migration applies cleanly./manage.py makemigrations enterprise --dry-runreports "No changes detected" afterwards