Php artisan migrate-语法错误,意外'';(T字串)

Php artisan migrate-语法错误,意外'';(T字串),php,laravel-6,laravel-migrations,Php,Laravel 6,Laravel Migrations,迁移文件代码。语法错误 Schema::create('subjects', function (Blueprint $table) {$table->bigIncrements('id'); $table->bigIncrements('id'); $table->string('title')->nullable();     $table->integer('order_id')->default('0');      $table

迁移文件代码。语法错误

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();
});
已运行编写器更新。让我知道我错过了什么。


如果问题重复,我很乐意将其删除。

将其添加到迁移文件中,然后重试 只需删除一次“大增量”

 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();
});

删除一个
$table->bigIncrements('id')
default('0');=>违约(0);默认值('0');=>违约(0);正如@Ronak Dhoot所说