id(); $table->string("name")->default(""); $table->string("extra", 2000)->default(""); $table->unsignedInteger("index_weight")->default(0); $table->unsignedInteger("category_weight")->default(0); $table->unsignedInteger("search_weight")->default(0); $table->unsignedTinyInteger("is_custom")->default(0)->comment("是否自定义"); $table->timestamps(); $table->softDeletes(); }); Schema::create("spec_attr", function (Blueprint $t) { $t->id(); $t->unsignedInteger("spec_id"); $t->string("name"); $t->timestamps(); $t->softDeletes(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('spec'); Schema::dropIfExists('spec_attr'); } };