diff --git a/apps/bfd-model/bfd-model-rif/src/main/resources/db/migration/V113__Create_MBI_NUM_Indexes.sql b/apps/bfd-model/bfd-model-rif/src/main/resources/db/migration/V113__Create_MBI_NUM_Indexes.sql new file mode 100644 index 0000000000..a04ad39085 --- /dev/null +++ b/apps/bfd-model/bfd-model-rif/src/main/resources/db/migration/V113__Create_MBI_NUM_Indexes.sql @@ -0,0 +1,10 @@ +-- BFD-3163 +-- Create index on MBI_NUM to support lookup using us-mbi lookup. The MBI lookup +-- needs to check both the current beneficiaries table as well as the +-- beneficiaries_history table. +-- +CREATE INDEX CONCURRENTLY IF NOT EXISTS beneficiaries_history_mbi_idx + ON beneficiaries_history (mbi_num); + +CREATE INDEX CONCURRENTLY IF NOT EXISTS beneficiaries_mbi_idx + ON beneficiaries (mbi_num); \ No newline at end of file