2016_09_03_051144_create_navigations_table.php 878 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. use Illuminate\Database\Schema\Blueprint;
  3. use Illuminate\Database\Migrations\Migration;
  4. class CreateNavigationsTable extends Migration
  5. {
  6. /**
  7. * Run the migrations.
  8. *
  9. * @return void
  10. */
  11. public function up()
  12. {
  13. Schema::create('navigations', function(Blueprint $table) {
  14. $table->increments('id');
  15. $table->string('name');
  16. $table->string('url');
  17. $table->tinyInteger('state')->default(0)->comment('0-正常显示;1-隐藏');
  18. $table->smallInteger('sequence')->comment('排序');
  19. $table->tinyInteger('nav_type')->default(0)->comment('导航类型;0-自定义;1-分类导航');
  20. $table->integer('article_cate_id')->default(0)->comment('文章分类id');
  21. $table->timestamps();
  22. });
  23. }
  24. /**
  25. * Reverse the migrations.
  26. *
  27. * @return void
  28. */
  29. public function down()
  30. {
  31. Schema::drop('navigations');
  32. }
  33. }