#27319: Circular ForeignKeys between two unmanaged models produce incomplete
migrations
-------------------------------+--------------------------------------
     Reporter:  Jamie Bliss    |                    Owner:  nobody
         Type:  Uncategorized  |                   Status:  new
    Component:  Migrations     |                  Version:  1.10
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------

Comment (by Jamie Bliss):

 Replying to [comment:1 Tim Graham]:
 > Just to be sure the ticket isn't interpreted incorrectly, could you
 provide the sample models?

 In a new project, I started the apps `app1` and `app2` and added them to
 `INSTALLED_APPS`.

 `app1/models.py`:
 {{{
 from django.db import models

 class Spam(models.Model):
     myegg = models.ForeignKey('app2.Egg')

     class Meta:
         managed = False
 }}}

 `app2/models.py`:
 {{{
 from django.db import models

 class Egg(models.Model):
     myspam = models.ForeignKey('app1.Spam')

     class Meta:
         managed = False
 }}}

 In my case, only one migration in each application was created, and
 neither `myegg` nor `myspam` appears in either, just the primary keys.

--
Ticket URL: <https://code.djangoproject.com/ticket/27319#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" 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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.0f5918be4aa2d5c93871831e7c62c6c9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to