﻿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
28493	Foreign keys break on migration if models are renamed in a different app	Christopher Neugebauer	Jeremy Satterfield	"Steps to reproduce:

1. Create app `a`, with a model called `A`. Run `makemigrations a`
2. Create app `b`, with a model called `B`. Give `B` a `ForeignKey` to `A`. Run `makemigrations b`
3. Rename model `A` to `Aa`. Run `makemigrations a`
4. Run `migrate`

Expected behaviour:

The migration completes successfully

Actual behaviour:

Migration `0001` on `b` is run after migration `0002` on `a`, and the migration fails with the following error:

{{{    
raise ValueError('Related model %r cannot be resolved' % self.remote_field.model)
ValueError: Related model u'a.A' cannot be resolved
}}}
"	Bug	closed	Migrations	1.11	Normal	fixed			Accepted	1	0	0	0	0	0
