-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBCAAGBQJVyOlxAAoJEC0ft5FqUuEhB8AQAIp0uJ0YI8UGi9xDa1hf/PnO
RjT7OkfhbHqpDRGbvrtP2phfmgLFg3cmn+Njpk9ZPzDWy0eRMctsy/ONg5qglZkt
sO8PGGRJvIhJSr2FkvP/1DH0d6vqUbaL0966oWEd0Mm//iENYmE96IvKgpFYLZF7
qfHKnjCrzIiycrgS2y6kIL0tEk1OiuSJFaREu2POxDOVe3Zzfi425W0R1ve9K/62
uzxtoEFwZpJZY05KpvPPDCUld0fCEu7SvidHFYz1tAbc68Ydk7taHX+txp+gr/63
PJgx562W5qxNLHLU8SXV4kMxy6fixt+boN6I0mhNbfIOngjL2EeZYzIpQ6MyZFUx
Hky8EoxBbmVbK1hkopP4+l8I9fQNipwXZJYC+iItnL98wUg2mpV8gJIPiUajeajs
SqaX6Q84jddEpm8uCzu/nw5JamEe8pf1D6U7KtJ+h2zAsheaKrYfZyhPl2nPY6HB
Z/jd5ZYl2xY3ciXHdkVzugBhsbltBcJL4V8sELKHJ3N2P56LZggYv5mFGhKy3WWb
b1fi8Znkv8ifD9IBBfslbF+6ftjpHCes3Rv6wa6lEwvRV6/Zd2iKuxrUBq9H1oDj
JAOKo7CnLrW3aES4icQezMPZq2nONEpNbvVkW2d13ZV7tF4fD+VJ+gN6zIlvYOQc
jxeozTGF3siEl1D0JPPs
=OImB
-----END PGP SIGNATURE-----
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 django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
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.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment