I have a full operating locale django app, but I'm having troubles while migrating to the site5 server.
When I launch django's syncdb
command, all my models' tables are created, but then (I guess when it's creating relationship tables), I got the following error:
_mysql_exceptions.OperationalError: (1071, 'Specified key was too long; max key length is 1000 bytes')
I don't have any problem when I ask django to sync the locale db, this error only occurs in the server...
Any idea?
http://dev.mysql.com/doc/refman/5.0/en/create-index.html
http://dev.mysql.com/doc/refman/5.0/en/charset-unicode.html
You exceed the limitation when you CREATE INDEX.
Although sqlall tells you that none of your key is longer than the limit, you may exceed the limitation because you are using utf8 which uses 3 bytes per character.
One more possible reason is that you have used 'unique_together' in the Meta. This will require a longer index which may cause the issue.
Looks like a bug in django. It may be fixed in 1.2 release by e.g. http://code.djangoproject.com/changeset/13040