Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions app/models/pds_search_result.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
#
# Indexes
#
# index_pds_search_results_on_import (import_type,import_id)
# index_pds_search_results_on_patient_id (patient_id)
# index_pds_search_results_on_patient_import_step (patient_id,import_type,import_id,step) UNIQUE
# index_pds_search_results_on_import (import_type,import_id)
# index_pds_search_results_on_patient_id (patient_id)
#
# Foreign Keys
#
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# frozen_string_literal: true

class RemoveIndexPDSSearchResultsOnPatientImportStep < ActiveRecord::Migration[
8.0
]
def change
remove_index :pds_search_results,
name: "index_pds_search_results_on_patient_import_step",
column: %i[patient_id import_type import_id step],
unique: true
end
end
3 changes: 1 addition & 2 deletions 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[8.0].define(version: 2025_08_22_094829) do
ActiveRecord::Schema[8.0].define(version: 2025_08_26_135132) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_catalog.plpgsql"
enable_extension "pg_trgm"
Expand Down Expand Up @@ -718,7 +718,6 @@
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["import_type", "import_id"], name: "index_pds_search_results_on_import"
t.index ["patient_id", "import_type", "import_id", "step"], name: "index_pds_search_results_on_patient_import_step", unique: true
t.index ["patient_id"], name: "index_pds_search_results_on_patient_id"
end

Expand Down
5 changes: 2 additions & 3 deletions spec/factories/pds_search_results.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
#
# Indexes
#
# index_pds_search_results_on_import (import_type,import_id)
# index_pds_search_results_on_patient_id (patient_id)
# index_pds_search_results_on_patient_import_step (patient_id,import_type,import_id,step) UNIQUE
# index_pds_search_results_on_import (import_type,import_id)
# index_pds_search_results_on_patient_id (patient_id)
#
# Foreign Keys
#
Expand Down