2019_04_28_022240_create_table_subject_table.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateTableSubjectTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('cms_subject', function (Blueprint $table) {
  15. $table->bigIncrements('id');
  16. $table->integer('city_id');
  17. $table->string('city_name',20)->comment('城市名称'); //城市名称
  18. $table->string('title',70)->comment('专题名称');
  19. $table->tinyInteger('show_type')->default(0)->comment('商品展示方式:0:左图右字;1:通栏大图;2:左右滑动');
  20. $table->tinyInteger('is_open')->default(0)->comment('是否启用:0:开启;1:关闭');
  21. $table->timestamps();
  22. $table->softDeletes();
  23. });
  24. }
  25. /**
  26. * Reverse the migrations.
  27. *
  28. * @return void
  29. */
  30. public function down()
  31. {
  32. Schema::dropIfExists('cms_subject');
  33. }
  34. }