-
-
Notifications
You must be signed in to change notification settings - Fork 406
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
MySQLSyntaxErrorException: Specified key was too long; max key length is 3072 bytes #2401
Comments
This might be caused by the fact that I created the database like this
instead of like this
|
|
Recreated database to see if that fixes the issue. |
Recreating the database fixed this issue. Need to investigate how to make this work with utf8mb4; |
Long term we should consider using prefix indices. |
I just ran into this again while attempting to deploy OpenBoxes to a Digital Ocean managed database using MySQL 8. The ALTER DATABASE command had no effect
so I just used a index prefix length for multiple columns.
The lengths above were derived by querying live data to find the appropriate size. Max length of product.product_code
Max length of inventory_item.lot_number
Max length of location.name
|
When this is resolved, please double check https://github.com/openboxes/openboxes/blob/develop/src/test/resources/testcontainers/my.cnf as there might be changes required there as well. |
The text was updated successfully, but these errors were encountered: