2019_08_05_174148_create_settings_table.php 988 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateSettingsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('settings', function (Blueprint $table) {
  15. $table->bigIncrements('id');
  16. $table->string('name')->comment('配置名');
  17. $table->string('slug', 20)->comment('标志');
  18. $table->string('type', 20)->default('string')->comment('配置类型');
  19. $table->text('body')->comment('配置项');
  20. $table->bigInteger('area_id')->default(0)->comment('区域id');
  21. $table->tinyInteger('status')->default(1);
  22. $table->timestamps();
  23. });
  24. }
  25. /**
  26. * Reverse the migrations.
  27. *
  28. * @return void
  29. */
  30. public function down()
  31. {
  32. Schema::dropIfExists('settings');
  33. }
  34. }