laravel5.4在执行php artisan migrate出现错误:
[PDOException] SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'shusers' already exists
原因是因为mysql的版本低utf8mb4的字节不够。
解决方法:
app\Providers\AppServiceProvider.php
给boot方法添加入下代码
public function boot()
{
Schema::defaultStringLength(191);
}
本文由:xiaoshu168 作者:xiaoshu发表,转载请注明来源!