2018_09_29_151403_create_navigations_table.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateNavigationsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('navigations', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->string('alias')->index()->comment('别名');
  17. $table->tinyInteger('urltype')->default('0')->comment('类型(1:系统内 0:系统外)');
  18. $table->tinyInteger('display')->default('1')->comment('是否显示(0:不显示 1:显示)');
  19. $table->string('title')->comment('栏目名称');
  20. $table->string('color')->comment('显示颜色')->nullable();
  21. $table->string('pagealias')->comment('系统页面别名');
  22. $table->string('tag')->comment('导航关联');
  23. $table->string('url')->comment('链接地址')->nullable();
  24. $table->string('target')->comment('打开方式');
  25. $table->integer('order')->comment('排序');
  26. $table->tinyInteger('is_personal')->comment('是否个人中心(0:不是 1:是)')->nullable();
  27. $table->timestamps();
  28. $table->softDeletes();
  29. });
  30. }
  31. /**
  32. * Reverse the migrations.
  33. *
  34. * @return void
  35. */
  36. public function down()
  37. {
  38. Schema::dropIfExists('navigations');
  39. }
  40. }