by VuongN · 12y ago · 0 comments
1. If you do heavy TDD, you might not like that fact that you can't skip migrations the same way you previously could with SOUTH_TESTS_MIGRATE = False. There's a thread going on (https://groups.google.com/forum/#!topic/django-developers/PW...). It appears that with syncdb going away, there isn't an option available. I really hope there's a way to retain syncdb for unittest because I don't need to test database migration every time I run my quick unittests.
2. I think 'makemigrations' is a bit inconsistent at the moment. Sometimes it creates more than 1 initial files, sometimes it creates just 1 (if you run 'makemigrations app-name' instead of 'makemigrations')
There are a couple of other general Django issues, but those are the things I encountered while working with 1.7.x.
Note that it's possible to squash a long series of migrations to just one "CREATE TABLE" version: https://docs.djangoproject.com/en/dev/topics/migrations/#squ...
After squashing, the new all-in-one migration should be used for tests, and should be more or less identical to syncdb.
2. It may create more than 1 migration file if there are specific ordered dependencies afaik.
After squashing and migrating all existing databases, you can delete the old migrations files. The squashed migration becomes the new fresh migration that should usually contain just "CREATE TABLE" statements to be run on an empty database.