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
Prefix support and lengths of prefixes (where supported) are storage engine dependent. For example, a prefix can be up to 1000 bytes long for MyISAM tables, and 767 bytes for InnoDB tables.
http://dev.mysql.com/doc/refman/5.0/en/charset-unicode.html
utf8, a UTF-8 encoding of the Unicode character set using one to three bytes per character
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With