Hi Richard,

On 08/01/2015 06:27 PM, Richard Brockie wrote:
> Can someone please explain the implications of this note about squashing
> migrations in the documentation?
> 
> From: https://docs.djangoproject.com/en/1.7/topics/migrations/
> 
>     "Once you’ve squashed a migration, you should not then re-squash
>     that squashed migration until you have fully transitioned it to a
>     normal migration."
> 
> 
>  Is there a transition command to convert a squashed migration into a
> normal migration, or how should I go about this?

The transition steps are described immediately above the note you
quoted. See the two steps listed right after the text "you must then
transition the squashed migration to a normal initial migration, by:"

> Here is my current migration situation:
> 
> Migrations:
> 
>   * 0001_initial.py
>   * ...
>   * 0052_auto_20150711_1407.py
> 
> have been squashed into:
> 
>   * 0001_squashed_0052_auto_20150711_1407.py
> 
> Since then, I have created further migrations:
> 
>   * 0002_auto_20150731_0651.py
>   * 0003_auto_20150731_0659.py
> 
> I was a little surprised that the numbering continued from 0002 and not
> 0053. I am concerned that I will become confused with the overlapping
> numbering before/after the squash so I would like to streamline things a
> little. I'm ok to remove the first set of migrations 0001 to 0052 as
> they are correctly captured by the first squash.
> 
> What are your recommendations in a case like this?

To go ahead and remove the old migrations, along with the `replaces`
setting on the new squashed migration, as recommended in the docs. Just
first make sure every deployment of your project has run migrate since
the squash migration was created.

Carl

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/55C8E971.9050803%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to