diff --git a/db/migrate/20210108123456_add_index_on_reports_action_taken.rb b/db/migrate/20210108123456_add_index_on_reports_action_taken.rb new file mode 100644 index 00000000..f8609db7 --- /dev/null +++ b/db/migrate/20210108123456_add_index_on_reports_action_taken.rb @@ -0,0 +1,7 @@ +class AddIndexOnReportsActionTaken < ActiveRecord::Migration[5.2] + disable_ddl_transaction! + + def change + add_index :reports, :action_taken, algorithm: :concurrently + end +end diff --git a/db/schema.rb b/db/schema.rb index 9c022764..e0a05c6b 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # 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 enable_extension "pg_stat_statements" @@ -631,6 +631,7 @@ ActiveRecord::Schema.define(version: 2021_01_03_150000) do t.bigint "assigned_account_id" t.string "uri" 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" end