﻿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
7750	TextField in unique_together breaks with MySQL BLOB index without index key length	benjaoming	nobody	"I get this exception:

{{{
_mysql_exceptions.OperationalError: (1170, ""BLOB/TEXT column 'text' used in key specification without a key length"")
}}}

I'm not quite sure about what's the right thing to do. Apparently a text field can't be used in key combinations in MySQL and probably neither in other SQL flavors. So maybe Django should raise an exception and/or the documentation should include which kinds of fields that are valid for the unique_together meta attribute.

An example could be:

{{{
class Messages(models.model)
    subject = models.CharField(max_length=20)
    msg = models.TextField
    
    class Meta:
         unique_together = (""subject"", ""msg"")
}}}
"		closed	Database layer (models, ORM)	dev		duplicate	unique_together		Unreviewed	0	0	0	0	0	0
