手动配置迁移命令migrate
生成的默认字符串长度,在AppServiceProvider
中调用Schema::defaultStringLength
方法来实现配置:
use Illuminate\Support\Facades\Schema; public function boot() { Schema::defaultStringLength(191); }
手动配置迁移命令migrate
生成的默认字符串长度,在AppServiceProvider
中调用Schema::defaultStringLength
方法来实现配置:
use Illuminate\Support\Facades\Schema; public function boot() { Schema::defaultStringLength(191); }