소스 검색

分类字段

wzq 5 년 전
부모
커밋
961c075024
1개의 변경된 파일40개의 추가작업 그리고 0개의 파일을 삭제
  1. 40 0
      database/migrations/2019_08_23_152409_add_is_open_to_table_category.php

+ 40 - 0
database/migrations/2019_08_23_152409_add_is_open_to_table_category.php

@@ -0,0 +1,40 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddIsOpenToTableCategory extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('category', function (Blueprint $table) {
+            $table->integer('is_open')
+                ->default(1)
+                ->after('is_suggest')
+                ->comment('是否开启:0否,1是');
+
+            $table->integer('sort')
+                ->default(999)
+                ->after('is_open')
+                ->comment('排序');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('category', function (Blueprint $table) {
+            //
+        });
+    }
+}