瀏覽代碼

添加source索引

visuddhinanda 3 年之前
父節點
當前提交
0921bd5483
共有 1 個文件被更改,包括 34 次插入0 次删除
  1. 34 0
      database/migrations/2022_08_14_133812_add_sourceindex_in_user_dicts.php

+ 34 - 0
database/migrations/2022_08_14_133812_add_sourceindex_in_user_dicts.php

@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class AddSourceindexInUserDicts extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('user_dicts', function (Blueprint $table) {
+            //
+			$table->index(['source']);
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('user_dicts', function (Blueprint $table) {
+            //
+            $table->dropIndex('user_dicts_source_index');
+        });
+    }
+}