Skip to content

Commit

Permalink
Index profiles#person_id to improve SAR performance (#2403)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyprivett authored Nov 13, 2024
1 parent 8012671 commit e406cfc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions db/migrate/20241113160043_add_index_to_person_id.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddIndexToPersonId < ActiveRecord::Migration[7.1]
def change
add_index :profiles, :person_id
end
end
3 changes: 2 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.1].define(version: 2024_05_02_112955) do
ActiveRecord::Schema[7.1].define(version: 2024_11_13_160043) do
# These are extensions that must be enabled in order to support this database
enable_extension "citext"
enable_extension "pgcrypto"
Expand Down Expand Up @@ -607,6 +607,7 @@
t.string "csra"
t.index ["category_code"], name: "index_profiles_on_category_code"
t.index ["category_id"], name: "index_profiles_on_category_id"
t.index ["person_id"], name: "index_profiles_on_person_id"
t.index ["updated_at"], name: "index_profiles_on_updated_at"
end

Expand Down

0 comments on commit e406cfc

Please sign in to comment.