SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table permissions
add unique permissions_name_guard_name_unique
(name
, guard_name
))
Ini terjadi ketika install spatie bg.
Kira kira ada solusi
As outlined in the Migrations guide to fix this all you have to do is edit your AppServiceProvider.php file and inside the boot method set a default string length:
use Illuminate\Support\Facades\Schema;
public function boot()
{
Schema::defaultStringLength(191);
}
After that everything should work as normal. If you enjoyed this post be sure and join the weekly Laravel newsletter and never miss out on new releases, framework tips, and new tutorials.
Source: Laravel News
Mari Kita Bangun Screencast