2017_05_30_203520_create_admin_menus_table.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. /**
  6. * Migration auto-generated by Sequel Pro Laravel Export
  7. * @see https://github.com/cviebrock/sequel-pro-laravel-export
  8. */
  9. class CreateAdminMenusTable extends Migration
  10. {
  11. /**
  12. * Run the migrations.
  13. *
  14. * @return void
  15. */
  16. public function up()
  17. {
  18. Schema::create('admin_menus', function (Blueprint $table) {
  19. $table->increments('id');
  20. $table->integer('pid');
  21. $table->char('path', 60)->comment('URL');
  22. $table->char('name', 50)->comment('节点的名字');
  23. $table->tinyInteger('display')->default(1)->comment('1为显示为菜单,0则不显示');
  24. $table->integer('sort')->default(1)->comment('排序');
  25. $table->tinyInteger('level')->default(1)->comment('第几级菜单');
  26. $table->char('ico', 20)->comment('菜单图标');
  27. $table->string('mark', 255)->default('')->comment('备注');
  28. $table->timestamps();
  29. $table->softDeletes();
  30. $table->index('deleted_at', 'idx_deleted_at');
  31. });
  32. }
  33. /**
  34. * Reverse the migrations.
  35. *
  36. * @return void
  37. */
  38. public function down()
  39. {
  40. Schema::dropIfExists('admin_menus');
  41. }
  42. }