creativetimofficial / vue-material-dashboard-laravel-bs4

Vue SPA Material template connected to working Laravel REST API with the help of json:api standard
MIT License
63 stars 199 forks source link

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 `users` add unique `users_email_unique`(`email`)) #7

Closed cococococococo closed 3 years ago

cococococococo commented 3 years ago

when trying to migrate i get this error:

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 users add unique users_email_unique(email))

I try to correct using this: https://laravel-news.com/laravel-5-4-key-too-long-error

but in the public function boot there is already this line LaravelJsonApi::defaultApi('v1'); so I don't know well how to handle this. Schema::defaultStringLength(191);

If I keep both then I get this error: Symfony\Component\Debug\Exception\FatalThrowableError : Class 'App\Providers\Schema' not found

cococococococo commented 3 years ago

solved using this thread ... https://laracasts.com/discuss/channels/laravel/php-artisan-migrate-errorclass-appprovidersschema-not-found?page=1

teamupdivision commented 3 years ago

Hello @cococococococo, thanks for using our products! Glad you solved your issue quickly, are using by any chance MariaDB on your dev environment?

Thanks