Browse Source

修改索引

ANG YU 5 years ago
parent
commit
4fc50f601f

+ 4 - 2
database/migrations/2021_01_21_100909_add_created_at_index_order_packages.php

@@ -15,7 +15,8 @@ class AddCreatedAtIndexOrderPackages extends Migration
     {
         Schema::table('order_packages', function (Blueprint $table) {
             //
-            $table->index(['created_at','status']);
+            $table->index('created_at');
+            $table->index(['status','created_at']);
         });
     }
 
@@ -28,7 +29,8 @@ class AddCreatedAtIndexOrderPackages extends Migration
     {
         Schema::table('order_packages', function (Blueprint $table) {
             //
-            $table->dropIndex('order_packages_created_at_status_index');
+            $table->dropIndex('order_packages_created_at_index');
+            $table->dropIndex('order_packages_status_created_at_index');
         });
     }
 }