mirror of
https://github.com/koel/koel.git
synced 2026-04-25 08:46:00 +03:00
[GH-ISSUE #542] Syntax error or access violation: 1071 Specified key was too long; max key length is 1 #382
Labels
No labels
Authentication
Dependencies
Documentation
Feature Request
Flac
Help Wanted
Installation/Setup
Integration
Mobile
PR Welcome
Pending Release
Performance
Playlist
S3
Search
Sync
[Pri] Low
[Pri] Normal
[Status] Keep Open
[Status] Needs Author Reply
[Status] Needs Review
[Status] Stale
[Status] Will Implement
[Type] Blessed
[Type] Bug
[Type] Duplicate
[Type] Enhancement
[Type] Help Request
[Type] Question
[Type] Task
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/koel-koel#382
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @shahidkarimi on GitHub (Feb 19, 2017).
Original GitHub issue: https://github.com/koel/koel/issues/542
Hey, thanks for contributing to Koel! To save time for both of us, please make sure these checkboxes are checked before submitting the issue:
All checked? Now also make sure your issue
@MonBrice commented on GitHub (Feb 28, 2017):
Had the same issue and found out this might be a problem when using mysql lower than 5.7. or maria db (on debian systems e.g.). Laravel changed something in the default database character set, so you must add a key length to all primary or unique keys which will be created by the stuff in koel/database/migrations
Example:
$table->string('email', 100)->unique();After that (3 or 4 additions), i was able to finish the installation, hope this helps.
@shahidkarimi commented on GitHub (Mar 10, 2017):
My MySQL version is 5.7.11 and still having the issue. @MonBrice
@ghost commented on GitHub (Mar 24, 2017):
@shahidkarimi a workaround is to update the migration files so that anything that creates a string has a default length. It is tedious, yes, but I had the same issue and that was the only solution that worked for me.
This is an issue with Illuminate - the default string length defined by the Illuminate blueprint is larger than the default maximum length allowed by many MySQL servers because it assumes you want support for things such as emoji (that is to say, it uses the
utf8mb4charset).See: https://github.com/laravel/framework/pull/16629
@ghost commented on GitHub (Mar 24, 2017):
@shahidkarimi actually, you may be able to set this in the boot function so that you don't have to update the migrations, as per http://stackoverflow.com/a/23786522
This is located in
/path/to/koel/app/Providers/App/AppServiceProvider.php.