Added indexes for reports

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-12-15 13:24:01 +00:00
parent 56f9c7f2f5
commit 2d85eeface

View file

@ -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']);
});
}
}