add index on email email event
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
# index_email_events_on_account_id (account_id)
|
# index_email_events_on_account_id (account_id)
|
||||||
|
# index_email_events_on_email (email)
|
||||||
# index_email_events_on_emailable (emailable_type,emailable_id)
|
# index_email_events_on_emailable (emailable_type,emailable_id)
|
||||||
# index_email_events_on_message_id (message_id)
|
# index_email_events_on_message_id (message_id)
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class AddIndexOnEmailEmailEvents < ActiveRecord::Migration[7.1]
|
||||||
|
def change
|
||||||
|
add_index :email_events, :email
|
||||||
|
end
|
||||||
|
end
|
||||||
+2
-1
@@ -10,7 +10,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema[7.1].define(version: 2024_07_14_172222) do
|
ActiveRecord::Schema[7.1].define(version: 2024_07_20_063826) do
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
|
||||||
@@ -110,6 +110,7 @@ ActiveRecord::Schema[7.1].define(version: 2024_07_14_172222) do
|
|||||||
t.datetime "event_datetime", null: false
|
t.datetime "event_datetime", null: false
|
||||||
t.datetime "created_at", null: false
|
t.datetime "created_at", null: false
|
||||||
t.index ["account_id"], name: "index_email_events_on_account_id"
|
t.index ["account_id"], name: "index_email_events_on_account_id"
|
||||||
|
t.index ["email"], name: "index_email_events_on_email"
|
||||||
t.index ["emailable_type", "emailable_id"], name: "index_email_events_on_emailable"
|
t.index ["emailable_type", "emailable_id"], name: "index_email_events_on_emailable"
|
||||||
t.index ["message_id"], name: "index_email_events_on_message_id"
|
t.index ["message_id"], name: "index_email_events_on_message_id"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user