[index] add index on reports.action_taken

This commit is contained in:
Fosco Marotto 2021-01-08 12:36:49 -05:00
parent 152e59a66f
commit c1213f4137
2 changed files with 9 additions and 1 deletions

View File

@ -0,0 +1,7 @@
class AddIndexOnReportsActionTaken < ActiveRecord::Migration[5.2]
disable_ddl_transaction!
def change
add_index :reports, :action_taken, algorithm: :concurrently
end
end

View File

@ -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.define(version: 2021_01_03_150000) do ActiveRecord::Schema.define(version: 2021_01_08_123456) 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 "pg_stat_statements" enable_extension "pg_stat_statements"
@ -631,6 +631,7 @@ ActiveRecord::Schema.define(version: 2021_01_03_150000) do
t.bigint "assigned_account_id" t.bigint "assigned_account_id"
t.string "uri" t.string "uri"
t.index ["account_id"], name: "index_reports_on_account_id" t.index ["account_id"], name: "index_reports_on_account_id"
t.index ["action_taken"], name: "index_reports_on_action_taken"
t.index ["target_account_id"], name: "index_reports_on_target_account_id" t.index ["target_account_id"], name: "index_reports_on_target_account_id"
end end