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

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 :: warning illegal string offset 
Php :: laravel check if exists in table 
Php :: symfony migrate fresh 
Php :: laravel group by with where clause 
Php :: eloquent pluck multiple columns 
Php :: create livewire component 
Php :: php remove html tag 
Php :: php 
Php :: password validation rules laravel 
Php :: laravel middleware route 
Php :: php json_encode utf8 
Php :: php unset reference 
Php :: return view in laravel controller 
Php :: php count matching words in two strings 
Php :: format seconds to human readable carbon 
Php :: how to remove Website field from comments 
Php :: web api return json example in php 
Php :: php new stdClass object 
Php :: magento2 set session timeout cia cli 
Php :: pdo bind param 
Php :: php check if post file is empty 
Php :: check if the request is ajax request in laravel 
Php :: reset array keys php 
Php :: str_ireplace 
Php :: wp get_posts return ids 
Php :: laravel query builder get data as array of array 
Php :: mcrypt php extension required 
Php :: if is front end wp 
Php :: foreach in laravel 
Php :: laravel get latest 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =