adjust indexes

This commit is contained in:
Pete Matsyburka committed 2025-06-18 11:56:42 +03:00
1 parent 7965c17f46
commit 2491b7b7e3
7 files changed
+25 -10

No files matched your search

@@ -3,5 +3,8 @@
class AddSubmissionsTemplateIndex < ActiveRecord::Migration[8.0]
def change
add_index :submissions, %i[account_id template_id id], where: 'archived_at IS NULL'
add_index :submissions, %i[account_id template_id id],
where: 'archived_at IS NOT NULL',
name: 'index_submissions_on_account_id_and_template_id_and_id_archived'
end
end