first(fn (array $index): bool => $index['columns'] === ['user_id', 'source', 'created_at'] ); expect($match)->not->toBeNull( 'Expected a (user_id, source, created_at) index on transactions for the daily email query.' ); expect($match['name'])->toBe('idx_transactions_user_source_created'); });