If you encounter migration errors in content_libraries, contentstore, or modulestore_migrator

I recently merged an openedx-platform PR that may cause database migrations in content_libraries, contentstore, or modulestore_migrator to break when trying to create or modify foreign keys to models in the openedx-learning repo. This should not affect anyone who is updating from Ulmo or master, or installing from scratch. This may affect you if you have developer database state from the middle of the Ulmo release cycle, e.g. October 2025, and you haven’t run database migrations since then.

If you encounter an error like this, please try running the following:

python manage.py cms migrate openedx_content 0001

Then run the migrations for whatever app failed the first time. For example:

python manage.py cms migrate modulestore_migrator

Please see the ADR for details about the change, why this can happen, and why this approach was chosen.