django-celery: Mysql error 1071 : Specified key was too long; max key length is 767 bytes
I’m using mysql with encoding set as utf8mb4
.
Because of that, an index on a column larger than 191 characters will trigger a mysql error 1071 when migrating djcelery
django.db.utils.DatabaseError: (1071, 'Specified key was too long; max key length is 767 bytes')
I’ve tried tons of different stuff in order to make that work, but the only working solution I came up with was to fork the project, and reduce all columns that caused the error to 191 chars.
Any help here would be extremely appreciated !
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Comments: 18 (4 by maintainers)
For avoiding this error in MariaDB just specify utf8_general_ci at creation time:
create database database_name default CHARACTER set utf8 default COLLATE utf8_general_ci;
If you can’t create a new database, just convert it. It will avoid this error.