violation: 1071 Specified key was too long; max key length is 1000 bytes

35

use Illuminate\Support\Facades\Schema;

public function boot()
{
    Schema::defaultStringLength(191);
}
use Illuminate\Support\Facades\Schema;

/**
 * Bootstrap any application services.
 *
 * @return void
 */
public function boot()
{
    Schema::defaultStringLength(191);
}
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
Inside config/database.php, replace this line for mysql

Copy Code
'engine' => null',
with

Copy Code
'engine' => 'InnoDB ROW_FORMAT=DYNAMIC',
Instead of setting a limit on your string lenght.

Comments

Submit
0 Comments