From d8b651a544696e586bcc941335420ff9b7bf4fb5 Mon Sep 17 00:00:00 2001 From: Jarek Glowacki Date: Sun, 3 Jan 2016 23:21:50 +1100 Subject: [PATCH] Added missing step to transitioning squashed migrations. --- docs/topics/migrations.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/topics/migrations.txt b/docs/topics/migrations.txt index db52665067..01b5404fd6 100644 --- a/docs/topics/migrations.txt +++ b/docs/topics/migrations.txt @@ -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 in their database. -After this has been done, you must then transition the squashed migration to -a normal initial migration, by: +You must then transition the squashed migration to a normal migration by: -- Deleting all the migration files it replaces -- Removing the ``replaces`` argument in the ``Migration`` class of the - squashed migration (this is how Django tells that it is a squashed migration) +- Deleting all the migration files it replaces. +- Updating all migrations that depend on the deleted migrations to depend on + 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:: Once you've squashed a migration, you should not then re-squash that squashed