﻿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
12712	syncdb doesn't create tables for m2m through-less fields that are added on the model after the class_prepared signal	Ionel Cristian Maries	nobody	"It seems that syncdb adds the auto_created m2m tables only if the table for the model containing the m2m field weren't created yet.

This change was introduced in one of the multidb updates - see http://code.djangoproject.com/changeset/11710#file2

I have a weird use case here: I have a custom field that adds a m2m field on the model on the contribute_to_class call (unfortunately it happens later after the model is prepared due to some information needed from other models coupled with lazy relationships). This looks like a regression to me, 1.1 was handling this case just fine. Also, the m2m fields don't have an explicit through table (thus the auto_created flag).

Reverting back the condition in syncdb seems to solve this problem (also, the testsuite doesn't show any regression for me)."		closed	Database layer (models, ORM)	1.2-alpha		fixed		ionel.mc@…	Accepted	1	0	0	0	0	0
