迁移文件代码的代码。语法错误。Schema::create('subjects', function (Blueprint $table) {$table->bigIncrements('id'); $table->bigIncrements('id'); $table->string('title')->nullable(); $table->integer('order_id')->default('0'); $table->unsignedBigInteger('test_type_id'); $table->foreign('test_type_id')->references('id')->on('test_types'); $table->enum('status',['active','deactive','draft'])->default('draft'); $table->timestamps();});已经运行作曲家更新。让我知道我错过了什么。如果问题是重复的,我很乐意将其删除。
1 回答
喵喵时光机
TA贡献1846条经验 获得超7个赞
将此添加到迁移文件中,然后重试只需删除“bigIncrements”一次。
Schema::create('subjects', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('title')->nullable();
$table->integer('order_id')->default(0);
$table->unsignedBigInteger('test_type_id');
$table->foreign('test_type_id')->references('id')->on('test_types');
$table->enum('status',['active','deactive','draft'])->default('draft');
$table->timestamps();
});
- 1 回答
- 0 关注
- 76 浏览
添加回答
举报
0/150
提交
取消