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

OperationalError: "max key length is 3072 bytes" when running tests w/ MySQL w/o migrations #266

Closed
tuky opened this issue May 15, 2024 · 0 comments · Fixed by #267
Closed

Comments

@tuky
Copy link
Contributor

tuky commented May 15, 2024

Heyo. I'd like to point out that running tests with MySQL is not working because of the unique=True of registration_id. I know this issue was "fixed" in the migrations. But running migrations while testing is not an option for us (> 1000 migrations). So we deactivate migrations via https://docs.djangoproject.com/en/5.0/ref/settings/#migrate. And that leads to

django.db.utils.OperationalError: (1170, "BLOB/TEXT column 'registration_id' used in key specification without a key length")

Can we therefore set unique=False in the model as well, if the db is mysql? Thx

@tuky tuky changed the title OperationalError: "max key length is 3072 bytes" when running tests with MySQL OperationalError: "max key length is 3072 bytes" when running tests w/ MySQL w/o migrations May 15, 2024
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

Successfully merging a pull request may close this issue.

1 participant