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,
Try,
python manage.py migrate --list | grep "\[ \]\|^[a-z]" | grep "[ ]" -B 1
returns,
[ ] 0001_initial
[ ] 0002_auto_01201244
[ ] 0003_auto_12334333
[ ] 0031_auto_12344544
[ ] 0032_auto_45456767
[ ] 0033_auto_23346566
[ ] 0008_auto_3446677
Update:
If you have updated Django version >= 1.11
, use below command,
python manage.py showmigrations | grep '\[ \]\|^[a-z]' | grep '[ ]' -B 1