feat: add index to reporting events [CW-1960] (#7294)
* fix: annotation * feat: add better index for reporting_events
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
class AddIndexToReportingEvents < ActiveRecord::Migration[7.0]
|
||||
disable_ddl_transaction!
|
||||
|
||||
def change
|
||||
add_index :reporting_events, [:account_id, :name, :created_at], name: 'reporting_events__account_id__name__created_at', algorithm: :concurrently
|
||||
end
|
||||
end
|
||||
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.0].define(version: 2023_06_08_040738) do
|
||||
ActiveRecord::Schema[7.0].define(version: 2023_06_12_103936) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pg_stat_statements"
|
||||
enable_extension "pg_trgm"
|
||||
@@ -798,6 +798,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_06_08_040738) do
|
||||
t.float "value_in_business_hours"
|
||||
t.datetime "event_start_time", precision: nil
|
||||
t.datetime "event_end_time", precision: nil
|
||||
t.index ["account_id", "name", "created_at"], name: "reporting_events__account_id__name__created_at"
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user