Skip to content

Commit cb3acfd

Browse files
committed
Consolidate indexes in create_model_states_table migration for improved query performance
1 parent 174734b commit cb3acfd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

database/migrations/create_model_states_table.php.stub

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ return new class extends Migration
2626
}
2727

2828
$table->timestamps();
29-
$table->index(['model_type', 'model_id', 'field']);
30-
$table->index(['created_at']);
29+
30+
$table->index(['model_type', 'model_id', 'field', 'created_at']);
3131
});
3232
}
3333

0 commit comments

Comments
 (0)