Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `users` add index `users_userable_type_userable_id_index`(`userable_type`, `userable_id`)

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

use IlluminateSupportFacadesSchema;

/**
 * Bootstrap any application services.
 *
 * @return void
 */
public function boot()
{
    Schema::defaultStringLength(191);
}
 
PREVIOUS NEXT
Tagged: #Syntax #error #access #Specified #key #max #key #length #bytes #alter #table #add #index
ADD COMMENT
Topic
Name
2+9 =