So I'm rapidly iterating on a django app at the moment and I'm constantly adjusting models.py. Over the course of a day or two of programming and testing I generate a couple dozen migration files. Sometimes I really tear the schema apart and completely re-do it. This causes the migration process to complain a great deal about defaults and null values and so on. If possible, I would just like to scratch all the migration stuff and re-start the migrations now that I finally know what I'm doing. My approach thus far has been the following:
- delete everything in the migrations folder except for
__init__.py
. - drop into my PostgreSQL console and do:
DELETE FROM south_migrationhistory WHERE app_name='my_app';
- while at the PostgreSQL console, drop all of the tables associated with my_app.
- re-run
./manage.py makemigrations my_app
- this generates a0001_initial.py
file in my migrations folder. - run
./manage migrate my_app
- I expect this command to re-build all my tables, but instead it says: "No migrations to apply."
What gives?
Also, is the south_migrationhistory
database table still in play now that I've dumped South and have switched to Django 1.7?
Thanks.