After updating mod-srs to version 5.1.4, data import failed with the errors:
WARN RecordDaoImpl [376802223eqId] Error occurred on batch execution: ERROR: invalid input value for enum record_type: "MARC_BIB"
ERROR: insert or update on table “raw_records_lb” violates foreign key constraint “fk_raw_records_records” Detail: Key (id)=(9c0fab3f-a1ab-4a2e-b07f-eb8b9a0f82e7) is not present in table “records_lb”.
After investigation It turns out that this is due to the DB type MARC was changed to MARC_BIB but it was not updated in the database. Normally metadata like these needs to be updated by a DB migration script to change the value of the row. Perhaps there was a script for it but either it did not run or errored out, or there might have been no script at all. This issue needs to be investigated and fixed.
Steps to Reproduce:
- Run any DI CREATE job after upgrading mod-srs to version 5.1.4
- The DI job completes successfully
- The DI job completed with errors.
- Found in FSE and PTF environments