fix: Add index in conversation and reporting event (#4577)
Fixes chatwoot/product#422
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
class AddIndexToConversationAndReportingEvent < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
add_index :conversations, :last_activity_at
|
||||
add_index :reporting_events, :conversation_id
|
||||
end
|
||||
end
|
||||
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2022_04_24_081117) do
|
||||
ActiveRecord::Schema.define(version: 2022_04_28_101325) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pg_stat_statements"
|
||||
@@ -361,6 +361,7 @@ ActiveRecord::Schema.define(version: 2022_04_24_081117) do
|
||||
t.index ["assignee_id", "account_id"], name: "index_conversations_on_assignee_id_and_account_id"
|
||||
t.index ["campaign_id"], name: "index_conversations_on_campaign_id"
|
||||
t.index ["contact_inbox_id"], name: "index_conversations_on_contact_inbox_id"
|
||||
t.index ["last_activity_at"], name: "index_conversations_on_last_activity_at"
|
||||
t.index ["status", "account_id"], name: "index_conversations_on_status_and_account_id"
|
||||
t.index ["team_id"], name: "index_conversations_on_team_id"
|
||||
end
|
||||
@@ -662,6 +663,7 @@ ActiveRecord::Schema.define(version: 2022_04_24_081117) do
|
||||
t.datetime "event_start_time"
|
||||
t.datetime "event_end_time"
|
||||
t.index ["account_id"], name: "index_reporting_events_on_account_id"
|
||||
t.index ["conversation_id"], name: "index_reporting_events_on_conversation_id"
|
||||
t.index ["created_at"], name: "index_reporting_events_on_created_at"
|
||||
t.index ["inbox_id"], name: "index_reporting_events_on_inbox_id"
|
||||
t.index ["name"], name: "index_reporting_events_on_name"
|
||||
|
||||
Reference in New Issue
Block a user