2018_09_30_113416_create_helps_table.php 1005 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateHelpsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('helps', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->integer('type_id')->comment('帮助分类id');
  17. $table->integer('parent_id')->comment('帮助分类父id');
  18. $table->string('title')->comment('标题');
  19. $table->text('content')->comment('内容');
  20. $table->smallInteger('list_order')->comment('显示顺序');
  21. $table->integer('click')->comment('点击量');
  22. $table->timestamps();
  23. $table->softDeletes();
  24. });
  25. }
  26. /**
  27. * Reverse the migrations.
  28. *
  29. * @return void
  30. */
  31. public function down()
  32. {
  33. Schema::dropIfExists('helps');
  34. }
  35. }