Last Updated: February 25, 2016
·
1.132K
· ianwalter

Ignoring Ghost Migrations

I wish I had known about this flag sooner:

manage.py migrate --ignore-ghost-migrations

When you're hopping around on different feature branches and running migrations in Django (South) you'll undoubtedly run into this little diddy:

! I'm not trusting myself; either fix this yourself by fiddling

! with the south_migrationhistory table, or pass --delete-ghost-migrations

! to South to have it delete ALL of these records (this may not be good).

But if you're planning to go right back to a branch with those migrations it might make more sense to just ignore them.