I wrote a trivial new app in Django and after I ran ./manage.py migrate myapp, I realized I wanted to add some new fields. Since it's a new app, I want to update my original migration and not create a second migration, so I ran .manage.py migrate myapp zero to completely revert all migrations for the app.
However, even though it took Django about 5 seconds to initial apply my single migration, after 30 minutes of processing, it still hasn't been able to revert the migration.
I've killed all other connections to my local database, so I don't think it's waiting for anything. Yet top says Django's manage.py is hogging about 75% of my CPU.
My app only has three simple models, with a FK relation between them in a Parent<-Child<-Grandchild relationship, and there are no records in any of the tables.
I'm using a PostgreSQL backend.
Why is Django so inefficient at removing a migration for tables with no records?