visuddhinanda 2 年之前
父節點
當前提交
b1e849a911
共有 1 個文件被更改,包括 36 次插入0 次删除
  1. 36 0
      database/migrations/2023_10_15_054756_add_index_count_in_wbw_analyses.php

+ 36 - 0
database/migrations/2023_10_15_054756_add_index_count_in_wbw_analyses.php

@@ -0,0 +1,36 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class AddIndexCountInWbwAnalyses extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('wbw_analyses', function (Blueprint $table) {
+            //
+            $table->index('wbw_word');
+            $table->index('type');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('wbw_analyses', function (Blueprint $table) {
+            $table->dropIndex("wbw_analyses_wbw_word_index");
+            $table->dropIndex("wbw_analyses_type_index");
+
+        });
+    }
+}