Browse Source

回复数字段

wzq 5 years ago
parent
commit
198d438e7a

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

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