Closed vbessonov closed 3 years ago
@leonardr, I added a migration creating an index on loans.external_identifier
.
The example you provided was creating indices using BEGIN/EXCEPTION statements but I din't use them because I thought it's not required in this case.
Please do add the BEGIN...EXCEPT thing. We want to make migration scripts idempotent as much as possible. Sometimes migration script suites are run multiple times if there was a crash or error during migration, and this makes it smoother.
@leonardr, thank you for adding the safety to code to the migration. Could we merge this PR now?
Description
This PR adds a new database index for
loans
'sexternal_identifier
field.Motivation and Context
This index is required in the case of LCP when we are not able to use a library name as a part of endpoint URLs and have to use LCP license ID (loan's external identifier) to fetch a library: loan -> patron -> library.
How Has This Been Tested?
Checklist: