SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long

在使用命令php artisan migrate生成表的过程中报错

解决方法:

/project/app/Providers/AppServiceProvider.php 中boot()方法修改如下:

public function boot()  {
 
Schema::defaultStringLength(191); //Solved by increasing StringLength
 
}
原文地址:https://www.cnblogs.com/caibaotimes/p/14022422.html