﻿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
29378	"migration does not consistently rename field ""id"" to ""model_id"" depending on model name"	Shadi Akiki	nobody	"In the case where the model is 

{{{
 class Something(models.Model):
    field1 = ...
    field2 = ...
}}}

adding a field

{{{
    something_id = models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)^M
}}}

generates a ""rename"" in the migration from ""id"" to ""something_id"".

However, for

{{{
 class MyModel(models.Model):
    field1 = ...
    field2 = ...
}}}

adding a field

{{{
    mymodel_id = models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)^M
}}}

does not generate a ""rename"" in the migration."	Bug	closed	Migrations	2.0	Normal	worksforme			Unreviewed	0	0	0	0	0	0
