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

Fix an error on migration #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alamkanak
Copy link

@alamkanak alamkanak commented May 3, 2020

Currently in laravel 7, when trying to migrate, laravel throws the error:

PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes")

So to fix it, I limited the number of characters to 125, which is the maximum number that will not throw the error. The identifier is only 32 characters. So more than 125 characters is not needed anyway.

Currently, when trying to migrate, laravel throws the error: 

> PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes")

So to fix it, I limited the number of characters to 125, which is the maximum number that will not throw the error. The identifier is only 32 characters. So more than 125 characters are not needed anyway.
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 this pull request may close these issues.

1 participant