2019_06_04_023038_create_topic_group_table.php 925 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateTopicGroupTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('topic_group', function (Blueprint $table) {
  15. $table->bigIncrements('id');
  16. $table->string('name')->nullable()->comment('话题名称');
  17. $table->tinyInteger('status')->default(1)->comment('状态 1正常 0禁用');
  18. $table->string('img')->nullable()->comment('图片');
  19. $table->string('desc')->comment('介绍');
  20. $table->timestamps();
  21. $table->softDeletes();
  22. });
  23. }
  24. /**
  25. * Reverse the migrations.
  26. *
  27. * @return void
  28. */
  29. public function down()
  30. {
  31. Schema::dropIfExists('topic_group');
  32. }
  33. }