From f673b0c8b99f9f1ff0619b2f8919c2cbf0e8a952 Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Tue, 15 Oct 2024 04:47:14 +0800 Subject: [PATCH] Laravel Vapor - New index for admin /customers page --- ...10_15_044532_add_index_to_transactions.php | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 database/migrations/2024_10_15_044532_add_index_to_transactions.php diff --git a/database/migrations/2024_10_15_044532_add_index_to_transactions.php b/database/migrations/2024_10_15_044532_add_index_to_transactions.php new file mode 100644 index 00000000..531f857f --- /dev/null +++ b/database/migrations/2024_10_15_044532_add_index_to_transactions.php @@ -0,0 +1,34 @@ +index(['owner_id', 'owner_type', 'created_at', 'status'], 'idx_transactions_owner_date_status'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('transactions', function (Blueprint $table) { + // Drop the index + $table->dropIndex('idx_transactions_owner_date_status'); + }); + } +}