﻿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
23013	Removing unique_together constraint from model fails	Stephen Burrows	Tim Graham	"This actually fails in two places. In both cases, it is because `unique_together` is being set to None, and things expect it to be a list.

First, in trying to create the migration.

{{{
# django/django/db/migrations/operations/models.py, line 251
# This fails
return ""Alter %s for %s (%s constraint(s))"" % (self.option_name, self.name, len(self.unique_together))

# Should be
return ""Alter %s for %s (%s constraint(s))"" % (self.option_name, self.name, len(self.unique_together) if self.unique_together is not None else 0)
}}}

Second, in trying to *run* the migration (if you fix the first issue or manually create a migration.

{{{
# django/django/db/migrations/state.py, line 276
# This fails
meta_contents[""unique_together""] = list(meta_contents[""unique_together""])

# Should be
meta_contents[""unique_together""] = list(meta_contents[""unique_together""]) if meta_contents[""unique_together""] is not None else None
}}}"	Bug	closed	Migrations	1.7-rc-1	Release blocker	fixed		Stephen Burrows	Accepted	1	0	0	0	0	0
