Search
 
SCRIPT & CODE EXAMPLE
 

PHP

SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table `users` add unique `users_email_uniq

Update your /app/Providers/AppServiceProvider.php

use IlluminateSupportFacadesSchema;

public function boot()
{
    Schema::defaultStringLength(191);
}
Comment

SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes

use IlluminateSupportFacadesSchema;

/**
 * Bootstrap any application services.
 *
 * @return void
 */
public function boot()
{
    Schema::defaultStringLength(191);
}
Comment

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`))

// /app/Providers/AppserviceProvider.php

use IlluminateSupportFacadesSchema;

public function boot()
{
	Schema::defaultStringLength(191);
}
Comment

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`))

use IlluminateSupportFacadesSchema;

public function boot()
{
    Schema::defaultStringLength(191);
}

Comment

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); 
}
Comment

PREVIOUS NEXT
Code Example
Php :: create laravel project with composer 
Php :: laravel inrandomorder 
Php :: password match laravel 
Php :: how uninstall the laravel 
Php :: php convert spaces to underscores 
Php :: php strict-origin-when-cross-origin 
Php :: php select version ubuntu 
Php :: laravel carbon time format AM PM 
Php :: carbon start of day 
Php :: php array remove empty values 
Php :: laravel has table 
Php :: php check if file is video 
Php :: laravel ever over https 
Php :: laravel custom model primary Key 
Php :: function exists php 
Php :: php string cut first x characters 
Php :: check null in laravel blade 
Php :: check if a string contains a substring php 
Php :: check if constant is defined php 
Php :: webmin forgot password 
Php :: tmp cakephp name 
Php :: how to run specific seeder in laravel 
Php :: install php 7.3 on amazon linux 2 
Php :: get current date laravel 
Php :: php append to array 
Php :: laravel between dates 
Php :: add days to date with laravel 
Php :: display errors in codeigniter 
Php :: woocommerce change place order button text 
Php :: php remove characters not numbers or letters 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =