|
@@ -0,0 +1,37 @@
|
|
|
|
+<?php
|
|
|
|
+
|
|
|
|
+use Illuminate\Support\Facades\Schema;
|
|
|
|
+use Illuminate\Database\Schema\Blueprint;
|
|
|
|
+use Illuminate\Database\Migrations\Migration;
|
|
|
|
+
|
|
|
|
+class AddColumnWeightToInterestCircleMessages extends Migration
|
|
|
|
+{
|
|
|
|
+ /**
|
|
|
|
+ * Run the migrations.
|
|
|
|
+ *
|
|
|
|
+ * @return void
|
|
|
|
+ */
|
|
|
|
+ public function up()
|
|
|
|
+ {
|
|
|
|
+ Schema::table('interest_circle_messages', function (Blueprint $table) {
|
|
|
|
+ //
|
|
|
|
+ $table->decimal('weight', 8, 2)
|
|
|
|
+ ->index('idx_weight')
|
|
|
|
+ ->after('is_recommend')
|
|
|
|
+ ->default(0)
|
|
|
|
+ ->comment('权重');
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Reverse the migrations.
|
|
|
|
+ *
|
|
|
|
+ * @return void
|
|
|
|
+ */
|
|
|
|
+ public function down()
|
|
|
|
+ {
|
|
|
|
+ Schema::table('interest_circle_messages', function (Blueprint $table) {
|
|
|
|
+ //
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+}
|