How to optimize migrations in Django 1.8
我正在使用django 1.8,在迁移文件夹中有一个超过100个文件的应用程序。在Django,有没有一种不删除文件来"压缩"或"优化"这些迁移的方法,这样我就没有那么多迁移了?
你读过Django医生的这部分吗?
Squashing migrations?
You are encouraged to make migrations freely and not worry about how
many you have; the migration code is optimized to deal with hundreds
at a time without much slowdown. However, eventually you will want to
move back from having several hundred migrations to just a few, and
that’s where squashing comes in.
来源:https://docs.djangoproject.com/en/1.8/topics/migrations/