laravel migation error
use Illuminate\Support\Facades\Schema;
public function boot()
{
Schema::defaultStringLength(191);
}
laravel migation error
use Illuminate\Support\Facades\Schema;
public function boot()
{
Schema::defaultStringLength(191);
}
schema error laravel
use Illuminate\Support\Facades\Schema;
public function boot()
{
Schema::defaultStringLength(191);
}
Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table
Path : App/Providers/AppServiceProvider
Schema::defaultStringLength(191);
in AppServiceProvider didn't work for me. What worked for was editing the database.php file in config folder. Just edit
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
to
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
and it should work, although you will be unable to store extended multibyte characters like emoji.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us