add index

This commit is contained in:
Pete Matsyburka committed 2025-06-17 11:03:40 +03:00
1 parent 2aece98d67
commit d8bf2cc101
7 files changed
+38 -10

No files matched your search

@@ -0,0 +1,8 @@
# frozen_string_literal: true
class AddEmailEventsEventTypeIndex < ActiveRecord::Migration[8.0]
def change
add_index :email_events, %i[event_type email],
where: "event_type IN ('bounce', 'soft_bounce', 'complaint', 'soft_complaint')"
end
end
@@ -0,0 +1,7 @@
# frozen_string_literal: true
class AddTemplatesFolderIndex < ActiveRecord::Migration[8.0]
def change
add_index :templates, %i[account_id folder_id id], where: 'archived_at IS NULL'
end
end
@@ -0,0 +1,7 @@
# frozen_string_literal: true
class AddSubmissionsTemplateIndex < ActiveRecord::Migration[8.0]
def change
add_index :submissions, %i[account_id template_id id], where: 'archived_at IS NULL'
end
end