1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- /**
- * Migration auto-generated by Sequel Pro Laravel Export
- * @see https://github.com/cviebrock/sequel-pro-laravel-export
- */
- class CreateBaseSettingsTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('base_settings', function (Blueprint $table) {
- $table->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');
- }
- }
|