Skip to content

feat: add migration for enable_academies default value change (ENT-11220)#2597

Merged
iloveagent57 merged 1 commit into
openedx:masterfrom
sjasti-sonata-svg:sjasti/ENT-11220-enable-academies-all-customers
Apr 15, 2026
Merged

feat: add migration for enable_academies default value change (ENT-11220)#2597
iloveagent57 merged 1 commit into
openedx:masterfrom
sjasti-sonata-svg:sjasti/ENT-11220-enable-academies-all-customers

Conversation

@sjasti-sonata-svg

@sjasti-sonata-svg sjasti-sonata-svg commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Context

Follow-up to #2594.

PR #2594 changed the enable_academies model default from False to True but did not include the corresponding Django migration that makemigrations generates for a default= change. This PR adds that missing AlterField migration 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 enterprise after the model default was flipped in #2594.

  • AlterField on enterprisecustomer.enable_academiesdefault=True
  • AlterField on historicalenterprisecustomer.enable_academiesdefault=True

No data migration is needed — PR #2594 already handled existing customers with search enabled via 0244_enable_academies_for_existing_customers.

Related

Test plan

  • Run ./manage.py migrate enterprise and verify the migration applies cleanly
  • Verify ./manage.py makemigrations enterprise --dry-run reports "No changes detected" afterwards
  • Verify no test regressions

@codecov

codecov Bot commented Apr 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.91%. Comparing base (7704577) to head (1615840).
⚠️ Report is 1 commits behind head on master.

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           
Flag Coverage Δ
unittests 85.91% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@iloveagent57

Copy link
Copy Markdown
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 ./manage.py makemigrations enterprise it should get generated automatically

@sjasti-sonata-svg sjasti-sonata-svg force-pushed the sjasti/ENT-11220-enable-academies-all-customers branch from 980851c to 7720208 Compare April 15, 2026 13:49
@sjasti-sonata-svg sjasti-sonata-svg changed the title feat: enable academies for all existing customers regardless of search flag (ENT-11220) feat: add migration for enable_academies default value change (ENT-11220) Apr 15, 2026
…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.
@sjasti-sonata-svg sjasti-sonata-svg force-pushed the sjasti/ENT-11220-enable-academies-all-customers branch from 7720208 to 1615840 Compare April 15, 2026 14:46
@iloveagent57 iloveagent57 merged commit 4e0ed1c into openedx:master Apr 15, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants