Added missing step to transitioning squashed migrations.

This commit is contained in:
Jarek Glowacki 2016-01-03 23:21:50 +11:00 committed by Tim Graham
parent 6a298b220a
commit d8b651a544
1 changed files with 6 additions and 5 deletions

View File

@ -614,12 +614,13 @@ migrations it replaces and distribute this change to all running instances
of your application, making sure that they run ``migrate`` to store the change of your application, making sure that they run ``migrate`` to store the change
in their database. in their database.
After this has been done, you must then transition the squashed migration to You must then transition the squashed migration to a normal migration by:
a normal initial migration, by:
- Deleting all the migration files it replaces - Deleting all the migration files it replaces.
- Removing the ``replaces`` argument in the ``Migration`` class of the - Updating all migrations that depend on the deleted migrations to depend on
squashed migration (this is how Django tells that it is a squashed migration) the squashed migration instead.
- Removing the ``replaces`` attribute in the ``Migration`` class of the
squashed migration (this is how Django tells that it is a squashed migration).
.. note:: .. note::
Once you've squashed a migration, you should not then re-squash that squashed Once you've squashed a migration, you should not then re-squash that squashed