In Django, is there an easy way to check whether all database migrations have been run? I\'ve found manage.py migrate --list
, which gives me the information I want,
1.10 release notes:
The new
makemigrations --check
option makes the command exit with a non-zero status when model changes without migrations are detected.
If you don't want to create the migrations, combine it with --dry-run
:
python manage.py makemigrations --check --dry-run
Note that this doesn't check whether the migrations were applied, it only checks whether the migration files were created.