Indeed, Django can make many migrations for an initial set if it needs them
to de-circularise dependencies (e.g. two models with foreign keys pointing
at each other - it splits one of their FKs into a second migration).

Andrew

On Sun, Feb 8, 2015 at 11:17 PM, Curtis Maloney <[email protected]>
wrote:

> Could you provide details about what sort of field you added, please?
>
> I have seen cases where migrations will create two separate migrations for
> an initial.
>
> --
> Curtis
>
> On 9 February 2015 at 10:11, Yo-Yo Ma <[email protected]> wrote:
>
>> Using Python 3.4.2 and Django @stable/1.8.x (installed just moments
>> before this writing), I created a model with a "name" field, then created a
>> migration for it. Moments after, I added an "age" field to the model,
>> deleted the 0001_initial.py migration, deleted __pycache__ directories in
>> my entire project, deleted any *.py[cod] files in my project, then ran
>> makemigrations again (the goal being to create a fresh 0001 migration with
>> the latest fields again, since there is no SQLite3 database file (I
>> verified this as well)). When I do this, Django creates the same 0001
>> migration it did the first time, then creates a 0002 migration to add the
>> new field. Firstly, how is this even possible? Second, is this a known
>> issue in 1.8? I've never experienced this bug before, and it's always been
>> my M.O. on a new project to recreate a 0001 migration when I'm first
>> working on the models (to avoid having 30 migrations before the app is even
>> on a dev server).
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django developers (Contributions to Django itself)" 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-developers.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-developers/bfb1f2cd-b2be-4a16-a882-ecc6695865c9%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-developers/bfb1f2cd-b2be-4a16-a882-ecc6695865c9%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" 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-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CAG_XiSD%3DG4tR6fE4aF6xdgdEX6%3D0gRRCTW8%3DyiS8g9KBrBz7pA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-developers/CAG_XiSD%3DG4tR6fE4aF6xdgdEX6%3D0gRRCTW8%3DyiS8g9KBrBz7pA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" 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-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAFwN1upLKUR4G2eKMCegBii72LWjB%3DvXoNe9VR-e1FC8SQWHWw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to