Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: a lter table `users` add unique `users_email_unique`(`email`))

// Go to your AppServiceProvider.php and update the boot() method with:

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 #bytes #lter #table #add #unique
ADD COMMENT
Topic
Name
1+9 =