Skip to content

A free open source IT asset/license management system

Added indexes for reports

snipe2d85eefacef8
diff --git a/database/migrations/2023_12_15_024643_add_indexes_to_new_activity_report_fields.php b/database/migrations/2023_12_15_024643_add_indexes_to_new_activity_report_fields.php
new file mode 100644
index 0000000000..1410430592
--- /dev/null
+++ b/database/migrations/2023_12_15_024643_add_indexes_to_new_activity_report_fields.php
@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class AddIndexesToNewActivityReportFields extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('action_logs', function (Blueprint $table) {
+ $table->index('action_type');
+ $table->index('remote_ip');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::table('action_logs', function (Blueprint $table) {
+ $table->dropIndex(['action_type']);
+ $table->dropIndex(['remote_ip']);
+ });
+ }
+}