I have created a database with the collation utf8mb4_unicode_ci
I added this code to the AppServiceProvider
use Illuminate\Support\Facades\Schema;
public function boot()
{
Schema::defaultStringLength(191);
}
and still can't install voyager and get the same message
Illuminate\Database\QueryException : SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table
translationsadd uniquetranslations_table_name_column_name_foreign_key_locale_unique(table_name,column_name,foreign_key,locale))
I found the solution at this:
https://github.com/the-control-group/voyager/issues/901#issuecomment-291470960
it's about specifying the database engin.
'engine' => 'InnoDB ROW_FORMAT=DYNAMIC',
but why it is not clear at the documentation!
Thanks @emptynick
Because it's a database level issue, not necessarily a Voyager issue. Also, we just haven't put it there yet. Readme.io allows you to suggest changes, so feel free to do so
This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.
Most helpful comment
I found the solution at this:
https://github.com/the-control-group/voyager/issues/901#issuecomment-291470960
it's about specifying the database engin.
'engine' => 'InnoDB ROW_FORMAT=DYNAMIC',but why it is not clear at the documentation!
Thanks @emptynick