To manually resolve a CircularDependencyError, break out one of
the ForeignKeys in the circular dependency loop into a separate
migration, and move the dependency on the other app with it. If you’re unsure,
see how makemigrations deals with the problem when asked to create
brand new migrations from your models. In a future release of Django,
squashmigrations will be updated to attempt to resolve these errors
itself. [Author's note: These sentences really leave me blowing in the wind...maybe I can figure out what they mean, I guess? I thought squashing was supposed to be easy.]
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/SN6PR05MB3951135EF4ECFE249F51ED4BF1529%40SN6PR05MB3951.namprd05.prod.outlook.com.
On May 11, 2021, at 7:50 PM, 'Mike Lissner' via Django developers (Contributions to Django itself) <django-d...@googlegroups.com> wrote:
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/76351f53-d185-4dd1-9979-6a7c73015ef5%40Spark.
As you work on your project you will create more and more migrations. When they get to be too many, there are two approaches to trimming them down. The first is to use the squashmigrations command and process to create a merged migration file, however this approach comes with a number of caveats and gotchas that often make it impractical. The second way is to coordinate with your team to ensure that all installations of your app are up to date, then to have a coordinated day when migrations are removed and recreated from scratch. Which one is best for your organization will depend on the complexity of your project and the flexibility of your team.
--
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-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/ce1cb4d6-905f-4411-93df-4449796558a8n%40googlegroups.com.
So, my question is: Do people actually use squashmigrations with success?
--
You received this message because you are subscribed to a topic in the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-developers/xpeFRpMTBZw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/9d103a6d-1301-1a37-ef35-29b6f1521f51%40fleschenberg.net.