Hi Uri, On Friday 17 October 2014 01:30:10 Uri P wrote: > Thanks Andrew for enlightening me. That was helpful. > > Anyway, for me personally, data migration is the easiest part, I can do it > in a heartbeat by a simple script. > In contrary, solving circular dependencies seems to be very difficult in my > case, especially in light of the currently still limited amount of > documentation on the issue... > You've said that the circular dependencies are "enabled" by lazy loading, which implies that the references are more-or-less regular foreign keys (not, for example, the implicit one-to-one key generated for multi-table inheritance). In that case, breaking the circular dependency is not hard: comment out one of the offending FKs (so there is no longer a circular dependency), run makemigrations, un-comment it, and run makemigrations again. You will get, for the app where you did it, two migrations -- one creating the model without the FK, and one adding it, with all the dependencies automatically set up.
It may be useful to add something like this to the migrations documentation, although I suspect there wll always be cases left uncovered, and solving such problems in general will ultimately require one to "know the ins and outs of the new migration system". HTH, Shai. -- 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 django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. 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/201410170315.11295.shai%40platonix.com. For more options, visit https://groups.google.com/d/optout.