﻿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
24135	migrations.RenameModel does not rename m2m tables	Ruben Nielsen	Tim Graham	"Observe the following models

{{{
class Tag(Model):
    content = Charfield(...)

class CustomerModel(Model):
    keywords = ManyToManyField('Tag')
}}}

this will generate 3 tables
{{{
applabel_customermodel
applabel_tag
applabel_customermodel_keywords
}}}

when I try to rename CustomerModel to Customer in a migration, the autogenerated table is not renamed

migration:
{{{
operations = [
        migrations.RenameModel('CustomerModel', 'Customer'),
    ]
}}}

tables:
{{{
applabel_customer
applabel_tag
applabel_customermodel_keywords
}}}

This causes my code to fail, since lookups on customer.keywords.all() expect to find the table applabel_customer_keywords, which does not exist.

The error is observed in 1.7.1 and 1.7.2"	Bug	closed	Migrations	1.7	Release blocker	fixed	rename m2m		Ready for checkin	1	0	0	0	0	0
