|
@@ -0,0 +1,40 @@
|
|
|
|
+<?php
|
|
|
|
+
|
|
|
|
+use Illuminate\Support\Facades\Schema;
|
|
|
|
+use Illuminate\Database\Schema\Blueprint;
|
|
|
|
+use Illuminate\Database\Migrations\Migration;
|
|
|
|
+
|
|
|
|
+class AddPvToTableTopic extends Migration
|
|
|
|
+{
|
|
|
|
+ /**
|
|
|
|
+ * Run the migrations.
|
|
|
|
+ *
|
|
|
|
+ * @return void
|
|
|
|
+ */
|
|
|
|
+ public function up()
|
|
|
|
+ {
|
|
|
|
+ Schema::table('topic', function (Blueprint $table) {
|
|
|
|
+ $table->integer('follow_count')
|
|
|
|
+ ->default(0)
|
|
|
|
+ ->after('use_count')
|
|
|
|
+ ->comment('关注数');
|
|
|
|
+
|
|
|
|
+ $table->integer('pv')
|
|
|
|
+ ->default(0)
|
|
|
|
+ ->after('follow_count')
|
|
|
|
+ ->comment('浏览量');
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Reverse the migrations.
|
|
|
|
+ *
|
|
|
|
+ * @return void
|
|
|
|
+ */
|
|
|
|
+ public function down()
|
|
|
|
+ {
|
|
|
|
+ Schema::table('topic', function (Blueprint $table) {
|
|
|
|
+ //
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+}
|