.
├── cheese
│ ├── __init__.py
│ ├── migrations
│ │ └── __init__.py
│ └── models.py (model Cheese, links to eggs.Store and spam.Employee)
├── djtest
│ ├── basemodel.py
│ ├── __init__.py
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
├── eggs
│ ├── __init__.py
│ ├── migrations
│ │ └── __init__.py
│ └── models.py (model Store, links to spam.Employee)
├── manage.py
└── spam
├── __init__.py
├── migrations
│ └── __init__.py
└── models.py (model Employee, links to itself and eggs.Store; model
Eggs, links to spam.Employee and cheese.Cheese)
Issue the following commands for the attached project:
$ python manage.py makemigrations
$ manage squashmigrations cheese 0003
$ manage squashmigrations eggs 0002
The following is raised:
django.db.migrations.graph.CircularDependencyError: [('spam',
'0001_initial'), ('cheese', '0001_squashed_0003_cheese_updated_by'),
('spam', '0001_initial')]
--
Ticket URL: <https://code.djangoproject.com/ticket/23337>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Thanks for the detailed report. Just to make sure, did you reproduce
against `1.7-rc-2` or `1.7-rc-3`?
--
Ticket URL: <https://code.djangoproject.com/ticket/23337#comment:1>
* version: 1.7-rc-2 => 1.7-rc-3
Comment:
It was 1.7-rc-3, The option wasn't available when I reported.
--
Ticket URL: <https://code.djangoproject.com/ticket/23337#comment:2>
* severity: Normal => Release blocker
* stage: Unreviewed => Accepted
Comment:
Managed to reproduce.
--
Ticket URL: <https://code.djangoproject.com/ticket/23337#comment:3>
Comment (by andrewgodwin):
Ah, yes, squashing migrations does occasionally result in circular
dependencies and there's no way we can solve this in 1.7 (it requires some
specialised coding we just don't have). I'll add a note to the docs about
this and bump it down from Release Blocker to a more general issue we need
to solve next release.
--
Ticket URL: <https://code.djangoproject.com/ticket/23337#comment:4>
Comment (by Andrew Godwin <andrew@…>):
In [changeset:"459cfb523d8812081a623b29d0b8ab13bf87190a"]:
{{{
#!CommitTicketReference repository=""
revision="459cfb523d8812081a623b29d0b8ab13bf87190a"
Update squashmigration docs to also mention circ dep errs (refs #23337)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23337#comment:5>
* version: 1.7-rc-3 => master
* severity: Release blocker => Normal
--
Ticket URL: <https://code.djangoproject.com/ticket/23337#comment:6>
Comment (by Andrew Godwin <andrew@…>):
In [changeset:"fbe45076234b1509a574a78a0f2b2dda602836db"]:
{{{
#!CommitTicketReference repository=""
revision="fbe45076234b1509a574a78a0f2b2dda602836db"
[1.7.x] Update squashmigration docs to also mention circ dep errs (refs
#23337)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23337#comment:7>
* cc: info+coding@… (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/23337#comment:8>
* cc: python@… (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/23337#comment:9>
* cc: tarkatronic@… (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/23337#comment:10>
* cc: Sergey Fedoseev (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/23337#comment:11>
* cc: danniranderis (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/23337#comment:12>