8 de April de 2022
Errors
No Comments
adrianoApi
Para corrigir isso siga basata fazer:
Edite o arquivo app\Providers\AppServiceProvider.phpAdicione o namespace use Illuminate\Support\Facades\Schema;Dentro do método boot adicione Schema::defaultStringLength(191);
Ficando assim:
use Illuminate\Support\Facades\Schema; public function boot() { Schema::defaultStringLength(191); }
Fonte: https://pt.stackoverflow.com/questions/245432/sqlstate-42000-syntax-error-or-access-violation-1071-specified-key-was-too-lon
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long;
8 de April de 2022
Errors
No Comments
adrianoApi
Para corrigir isso siga basata fazer:
Edite o arquivo app\Providers\AppServiceProvider.php
Adicione o namespace use Illuminate\Support\Facades\Schema;
Dentro do método boot adicione Schema::defaultStringLength(191);
Ficando assim:
Fonte: https://pt.stackoverflow.com/questions/245432/sqlstate-42000-syntax-error-or-access-violation-1071-specified-key-was-too-lon