From 1cfcba4a38162269f5a425ad690be638d85d7069 Mon Sep 17 00:00:00 2001 From: nfstern02 <72567812+nfstern02@users.noreply.github.com> Date: Mon, 9 Sep 2024 15:29:26 -0500 Subject: [PATCH] add index on approved (#1198) --- app/models/dashboard_exporter_importer.rb | 2 +- ...20240905145239_add_index_on_approved_on_institutions.rb | 7 +++++++ db/schema.rb | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20240905145239_add_index_on_approved_on_institutions.rb diff --git a/app/models/dashboard_exporter_importer.rb b/app/models/dashboard_exporter_importer.rb index 4ed74df16..69a2b2e6b 100644 --- a/app/models/dashboard_exporter_importer.rb +++ b/app/models/dashboard_exporter_importer.rb @@ -5,7 +5,7 @@ class DashboardExporterImporter # :nocov: include DashboardWatir - TABLES_TO_SKIP = %w[CipCode InstitutionSchoolRating VrrapProvider Weam].freeze + TABLES_TO_SKIP = %w[CipCode InstitutionSchoolRating VrrapProvider].freeze def initialize(user, pass, load_env = nil) common_initialize_watir(user, pass, load_env) diff --git a/db/migrate/20240905145239_add_index_on_approved_on_institutions.rb b/db/migrate/20240905145239_add_index_on_approved_on_institutions.rb new file mode 100644 index 000000000..7649d6f28 --- /dev/null +++ b/db/migrate/20240905145239_add_index_on_approved_on_institutions.rb @@ -0,0 +1,7 @@ +class AddIndexOnApprovedOnInstitutions < ActiveRecord::Migration[7.1] + disable_ddl_transaction! + + def change + add_index :institutions, :approved, algorithm: :concurrently + end +end diff --git a/db/schema.rb b/db/schema.rb index e4f5271b6..d2a5437a9 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[7.0].define(version: 2024_04_25_164737) do +ActiveRecord::Schema[7.1].define(version: 2024_09_05_145239) do # These are extensions that must be enabled in order to support this database enable_extension "cube" enable_extension "earthdistance" @@ -624,6 +624,7 @@ t.index "lower((address_1)::text) gin_trgm_ops", name: "index_institutions_on_address_1", using: :gin t.index "lower((address_2)::text) gin_trgm_ops", name: "index_institutions_on_address_2", using: :gin t.index "lower((address_3)::text) gin_trgm_ops", name: "index_institutions_on_address_3", using: :gin + t.index ["approved"], name: "index_institutions_on_approved" t.index ["city"], name: "index_institutions_on_city", opclass: :gin_trgm_ops, using: :gin t.index ["country"], name: "index_institutions_on_country" t.index ["cross"], name: "index_institutions_on_cross"