Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL error on migrate persists #285

Closed
benselme opened this issue Feb 7, 2022 · 6 comments
Closed

MySQL error on migrate persists #285

benselme opened this issue Feb 7, 2022 · 6 comments

Comments

@benselme
Copy link
Contributor

benselme commented Feb 7, 2022

I'm aware of DJANGO_CELERY_RESULTS_TASK_ID_MAX_LENGTH.

However migration 0004_auto_20190516_0412.py still fails with django.db.utils.OperationalError: (1709, 'Index column size too large. The maximum column size is 767 bytes.') because it's trying to create the task_name column which is 255-characters long and indexed.

@auvipy
Copy link
Member

auvipy commented Feb 8, 2022

can you elaborate more on the versions of everything you are using?

@benselme
Copy link
Contributor Author

benselme commented Feb 8, 2022

The database is MariaDB 10.1.48, but I deploy on an older version, 5.5.60

benselme added a commit to benselme/django-celery-results that referenced this issue Feb 8, 2022
@auvipy
Copy link
Member

auvipy commented Feb 9, 2022

what is the min version of mySQL supported for django 2.2+?

@benselme
Copy link
Contributor Author

benselme commented Feb 9, 2022

That would be MySQL 5.6 which is equivalent to MariaDB 10.1. For MariaDB >= 10.2.2, the server setting innodb_large_prefix defaults to ON, which should remove the limitation that causes the crash.

@auvipy
Copy link
Member

auvipy commented Feb 9, 2022

but I deploy on an older version, 5.5.60

sorry can't accept any contribution for unsuported versions :)

@benselme
Copy link
Contributor Author

benselme commented Feb 9, 2022

You misread what I wrote. Django 2.2 supports MySQL 5.6 and so also MariaDB 10.1, on which the problem happens.

auvipy pushed a commit that referenced this issue Feb 10, 2022
@auvipy auvipy closed this as completed Feb 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants