小编Fay*_*med的帖子

我如何使 Laravel 迁移更改并使列可以为空

我创建了一个 post_id 未签名的迁移。如何在新迁移中编辑 post_id 以使其也成功nullable()

    Schema::create('throttle', function(Blueprint $table)
    {
        $table->increments('id');
        $table->integer('post_id')->unsigned(); // this needs to also be nullable, how should the next migration be?
    }
Run Code Online (Sandbox Code Playgroud)

database-design laravel

2
推荐指数
1
解决办法
5506
查看次数

标签 统计

database-design ×1

laravel ×1