浏览代码

话题字段

wzq 5 年之前
父节点
当前提交
779dfe7aa9
共有 1 个文件被更改,包括 35 次插入0 次删除
  1. 35 0
      database/migrations/2019_08_16_110430_add_use_count_to_table_topic.php

+ 35 - 0
database/migrations/2019_08_16_110430_add_use_count_to_table_topic.php

@@ -0,0 +1,35 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddUseCountToTableTopic extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('topic', function (Blueprint $table) {
+            $table->integer('use_count')
+                ->default(0)
+                ->after('base_count')
+                ->comment('使用数');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('topic', function (Blueprint $table) {
+            //
+        });
+    }
+}