Reputation: 198
I have a Django project with multiple apps, many of which contain lots of migration files. I am attempting to squash these one app at a time using the squashmigrations
command, however doing so causes a CircularDepencdyError
. The Django docs here advise breaking out one of the keys in the circular dependency to resolve the error, but the error does not specify this level of detail. With thousands of lines of migration code to sift through, I am feeling stuck.
Does anyone have experience of solving this sort of issue or know of some best practices or tips on what to look for?
Upvotes: 1
Views: 880
Reputation: 198
As recommended by Sebastian, the fix to this circular dependency mess:
django_migrations
database tablemakemigrations
- Django creates new migration filesmigrate --fake
as you should already have the tables in the databaseAfter doing this, I was able to get manage.py test
working like a charm.
Upvotes: 3