遷移文件代碼的代碼。語法錯(cuò)誤。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();});已經(jīng)運(yùn)行作曲家更新。讓我知道我錯(cuò)過了什么。如果問題是重復(fù)的,我很樂意將其刪除。
1 回答

喵喵時(shí)光機(jī)
TA貢獻(xiàn)1846條經(jīng)驗(yàn) 獲得超7個(gè)贊
將此添加到遷移文件中,然后重試只需刪除“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 關(guān)注
- 106 瀏覽
添加回答
舉報(bào)
0/150
提交
取消