increments('id'); $table->string('key', 50)->comment('配置代码'); $table->text('value')->comment('配置名称'); $table->unsignedInteger('sort')->comment('排序'); $table->string('category', 50)->comment('配置类型'); $table->unsignedInteger('pid')->comment('父id'); $table->tinyInteger('status')->default(1)->comment('图片状态'); $table->timestamps(); $table->softDeletes(); $table->index('category', 'idx_category'); $table->index('key', 'idx_code'); $table->index('pid', 'idx_pid'); }); DB::update("ALTER TABLE base_settings AUTO_INCREMENT = 1000;"); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('base_settings'); } }