Open GoogleCodeExporter opened 8 years ago
This is a Django bug caused by a MySQL limitation:
http://code.djangoproject.com/ticket/2495
Basically, MySQL's complaining because it won't let you index a whole BLOB. The
workaround is to leave the UNIQUE off and add the index later using an ALTER
table
command.
Original comment by dev@simon.net.nz
on 7 Oct 2008 at 3:54
This should already be fixed (thank to brosner)
Original comment by doug.nap...@gmail.com
on 17 Oct 2008 at 4:29
oops, confused this with something else.
This issue has yet to be fixed in django.
I am still not comfortable marking the text field non-unique.
Original comment by doug.nap...@gmail.com
on 17 Oct 2008 at 4:33
Still a problem with MySQL that should be fixed in the DJango cod, but hasn't
been.
Problem has been around since Jun 2008
Comment out the unique_together(...) call, syncdb, then turn it back on.....
Can't find any docs on unique_together, but if you could specify a keylength,
maybe
this could be fixed here.....
Original comment by Mark0...@gmail.com
on 27 Dec 2008 at 7:14
This problem still exists. I followed the approach from mandric in the original
post--that is, I changed the TextField to a CharField with a max_length of 500.
Original comment by conrad...@gmail.com
on 28 Aug 2009 at 3:53
it is needed to limit UNIQUE keys like that:
UNIQUE (`survey_id`, `text`(100))
Original produces
UNIQUE (`survey_id`, `text`)
and mysql does not allow UNIQUE keys more than 1000 byte.
Modified sql is attached. Or do like that
$ /manage.py sqlall survey > survey.sql
and open and change lines below in survey.sql
UNIQUE (`survey_id`, `text`)
to
UNIQUE (`survey_id`, `text`(100))
and
UNIQUE (`question_id`, `text`)
to
UNIQUE (`question_id`, `text`(100))
and save survey.sql and execute this file with your mysql client app on your
database.
Original comment by ali.r.ke...@gmail.com
on 10 Mar 2010 at 11:24
Attachments:
Hey ... why I'm still having this problem ?
Original comment by raonygui...@gmail.com
on 4 Jul 2011 at 3:59
Hey ... why I'm still having this problem ?
Original comment by raonygui...@gmail.com
on 4 Jul 2011 at 3:59
Original issue reported on code.google.com by
mand...@gmail.com
on 2 Oct 2008 at 11:26Attachments: