2017_12_03_130032_create_navs.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateNavs extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('dc_navs', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->char('name',50)->comment('菜单名称');
  17. $table->char('icon',50)->comment('菜单图标')->default('')->nullable();
  18. $table->char('href',250)->comment('菜单地址')->nullable();
  19. $table->tinyInteger('type')->comment('菜单类型,0-左侧菜单,1-顶部菜单')->default('0')->nullable();
  20. $table->integer('sort')->comment('排序')->default('0')->nullable();
  21. $table->integer('parent_id')->comment('父级id')->default('0')->nullable();
  22. $table->tinyInteger('target')->comment('打开方式,0=内打开,1=外部打开')->default(0);
  23. $table->timestamps();
  24. });
  25. }
  26. /**
  27. * Reverse the migrations.
  28. *
  29. * @return void
  30. */
  31. public function down()
  32. {
  33. Schema::dropIfExists('dc_navs');
  34. }
  35. }