Den 12/06/2015 kl. 11.38 skrev Cherie Pun <cherie.cy.pun@gmail.com>:Hi,
I have trying to experiment with squashmigration to see if it will make it faster to build the database when running tests. So I have squashed the migrations following the instructions on the Django website. However when I run the tests, it still uses the original migrations. I thought Django automatically uses the squashed one over the separated ones. Is there some settings that I have to configure? Also, it says that no optimisation was available even though there are a few AddField which should in theory be combined into AddModel.
squashmigrations has limits to what it can do. You are free to edit the migration by hand if you can spot any more optimizations, and file a bug report if you spot something that the squasher should reasonably detect.
Have you seen the new "manage.py test --keepdb" in Django 1.8? I have a complicated project with lots of apps and use it daily to speed up testing. https://docs.djangoproject.com/en/1.8/ref/django-admin/#test-app-or-test-identifier
Erik
No comments:
Post a Comment