Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Syntax error or access violation: 1071 Specified key was too long; max key length


According to the official Laravel 7.x documentation, you can solve this quite easily.

Update your /app/Providers/AppServiceProvider.php to contain:

use IlluminateSupportFacadesSchema;

/**
 * Bootstrap any application services.
 *
 * @return void
 */
public function boot()
{
    Schema::defaultStringLength(191);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Syntax #error #access #Specified #key #max #key #length
ADD COMMENT
Topic
Name
6+5 =