2020_12_02_020655_create_icons_table.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateIconsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('icons', function (Blueprint $table) {
  15. $table->bigIncrements('id');
  16. $table->string('name')->comment('功能图标名称');
  17. $table->string('image')->comment('图片');
  18. $table->string('url')->comment('点击链接');
  19. $table->integer('type')->comment('类型 1.首页 2.文章中心 3.个人中心');
  20. $table->integer('type_cl')->comment('分类2 1.用户端 2.客户端');
  21. $table->integer('laval')->comment('排序');
  22. $table->integer('status')->comment('状态 0.禁用 1.启用')->nullable(false)->unsigned();
  23. $table->dateTime('created_at')->comment('创建时间');
  24. $table->dateTime('updated_at')->comment('更新时间');
  25. });
  26. }
  27. /**
  28. * Reverse the migrations.
  29. *
  30. * @return void
  31. */
  32. public function down()
  33. {
  34. Schema::dropIfExists('icons');
  35. }
  36. }