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 syntax error during migration. code: 1059 #152

Open
kroutony opened this issue Jul 22, 2019 · 1 comment
Open

Mysql syntax error during migration. code: 1059 #152

kroutony opened this issue Jul 22, 2019 · 1 comment

Comments

@kroutony
Copy link

kroutony commented Jul 22, 2019

Hi,
I got an mysql error during migration process.
Syntax error or access violation: 1059
Cause by name of unique key being too long.
reference source
A key name 'translator_translations_locale_namespace_group_item_unique' will be used automatically, whose length is 58.
And if database prefix is being used, it may violate the restriction of maximum length(64 characters).
Is it possible to just give it a specific short key name?
like
$table->unique(['locale', 'namespace', 'group', 'item'], 'short_name');

@kroutony kroutony changed the title Mysql syntax error on migrate. code: 1059 Mysql syntax error during migration. code: 1059 Jul 23, 2019
@smallcar88
Copy link

Same here

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