add index

This commit is contained in:
Pete Matsyburka committed 2026-11-02 10:18:16 +02:00
1 parent 7a75a6c887
commit 2692b8a1b5
2 files changed
+14 -1

No files matched your search

@@ -0,0 +1,12 @@
# frozen_string_literal: true
class AddSubmissionEventsAccountEventTypeCreatedAtIndex < ActiveRecord::Migration[8.1]
def change
return unless ENV['MULTITENANT'] == 'true'
add_index :submission_events, %i[account_id created_at],
where: "event_type = 'start_kba'",
if_not_exists: true,
name: 'index_submission_events_on_account_created_at_start_kba'
end
end