Django "makemigrations --check" Fails in CI (Missing Migrations)
A CI guard runs makemigrations --check --dry-run to ensure every model change has a migration. It exits non-zero because a model was edited without generating the matching migration file.
What this error means
The CI step fails reporting that models have changes not yet reflected in a migration. It is deterministic - the same uncommitted model change is detected every run until you create the migration.
Migrations for 'orders':
orders/migrations/0007_order_status.py
+ Add field status to order
Your models have changes that are not yet reflected in a migration.
(makemigrations --check exited 1)Common causes
Model changed without makemigrations
A field or model was added/altered in code, but python manage.py makemigrations was never run, so no migration captures it.
Migration generated but not committed
The migration file was created locally but not added to git, so CI still sees the model change as unreflected.
How to fix it
Generate and commit the migration
Create the migration for the changed app and commit it alongside the model change.
python manage.py makemigrations orders
git add orders/migrations/0007_order_status.pyKeep the check as a CI guard
Run the check so any future model change without a migration fails fast.
python manage.py makemigrations --check --dry-runHow to prevent it
- Run
makemigrationswhenever you change a model and commit the result. - Keep
makemigrations --check --dry-runin CI to catch omissions. - Review that migration files are staged in the same PR as model changes.