> > Your models should be lazy loading each other (using the string version > not directly importing).
Lazy loading is actually what got me into this mess - that's exactly what enabled my predecessors in my current project, to create those circular dependencies. They left me for example with two models in two apps pointing at each other. Python would have thrown them an ImportError if it weren't for lazy loading. The migrations feature, however, doesn't like that too much. On Thursday, October 16, 2014 6:16:14 PM UTC+3, Rotund wrote: > > First this is really a question for the django-users group. This is more > for actually developing Django. I think the root of your issue is actually > the app loading feature and not migrations. Your models should be lazy > loading each other (using the string version not directly importing). > > Secondly, the diff approach is difficult to get right, especially when you > consider data migration as well as schema migration. You can have a tested > path from a to d via b and c. It's tough to know how to get from a to d > without b and c. And the permutations grow exponentially. The Python > Community and especially the Django people are heavily into testing being > an important (read required) part of development and change integration > testing. > On Oct 16, 2014 5:38 AM, "Uri P" <[email protected] <javascript:>> wrote: > >> I have to admit I don't know the ins and outs of the new migration system >> in django1.7+, and I don't quite understand why it fails to handle circular >> dependencies which the old fashioned syncdb does. I would love to hear an >> explanation, but my main question is: >> >> I*f the initial syncdb is actually capable of creating the database for >> the models despite of the circular dependencies, why not base the migrating >> mechanism simply on some kind of DIFF between the existing database and the >> one that would have been created by syncdb for the newly changed models?* >> >> -- >> 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] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> 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/cef5b6e4-9f2e-4c81-aaee-0eede10d55b6%40googlegroups.com >> >> <https://groups.google.com/d/msgid/django-developers/cef5b6e4-9f2e-4c81-aaee-0eede10d55b6%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/ea883e82-7c26-4a0d-a7a1-8ae39c93187b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
