diff --git a/database/migrations/2023_12_18_230408_create_index_for_transaction_table.php b/database/migrations/2023_12_18_230408_create_index_for_transaction_table.php new file mode 100644 index 00000000..3dc38456 --- /dev/null +++ b/database/migrations/2023_12_18_230408_create_index_for_transaction_table.php @@ -0,0 +1,44 @@ +index('status'); + $table->index('type'); + $table->index('payment_method'); + $table->index('payment_reference'); + $table->index('bill_no'); + $table->index('owner_type'); + $table->index('owner_id'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('transactions', function (Blueprint $table) { + $table->dropIndex('status'); + $table->dropIndex('type'); + $table->dropIndex('payment_method'); + $table->dropIndex('payment_reference'); + $table->dropIndex('bill_no'); + $table->dropIndex('owner_type'); + $table->dropIndex('owner_id'); + }); + } +}