php artisan migrate时报错

2018-01-22  本文已影响0人  飞牛在天

执行完php artisan make:auth,再执行php artisan migrate时,报错
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes,解决方法:
在AppServiceProvider中

use Illuminate\Support\Facades\Schema; //import Schema

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

上一篇下一篇

猜你喜欢

热点阅读