showmigrations is a Django management command for checking migration state. It lists migrations across a project and marks applied migrations with an X, making database history easier to inspect than guesswork. section 10.4 section 10.6
Use the command to:
- Display migration status for the entire project. section 10.6
- Filter the listing by supplying one or more app names. section 10.4
- Recognize squashed migrations and see how many migration scripts they combine. section 10.4
Inspect one app
Run `python manage.py showmigrations promoters`. The output lists each migration under `promoters`; `[X]` means it has run, while `[ ]` means it still needs to run. A squashed entry can also report its combined migration count. section 10.4
(venv) RiffMates$ python manage.py showmigrations promoters promoters [X] 0001_initial [X] 0002_promoter_famous_for [X] 0003_promoter_common_name_promoter_full_name [X] 0004_data_fullname [X] 0005_remove_promoter_first_name_remove_promoter_last_name [ ] 0006_promoter_birth_squashed_0007_promoter_death (2 squashed migrations)
The listing makes applied, unapplied, and squashed migration states visible at a glance. section 10.4
