﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
23337	CircularDependencyError when squashing migrations	no	bcail	"Project layout:

.
├── 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')]
"	Bug	assigned	Migrations	dev	Normal			info+coding@… python@… tarkatronic@… Sergey Fedoseev danniranderis bcail Gordon Wrigley	Accepted	1	0	1	1	0	0
