dataquest-dev / dspace-import

Blackbox tests for dspace repository
Other
0 stars 2 forks source link

Removed file format PNG from the database - check python migration script #137

Closed milanmajchrak closed 7 months ago

milanmajchrak commented 7 months ago

Error: Flyway migrate wasn't working because of this error:

Message    : ERROR: duplicate key value violates unique constraint "bitstreamformatregistry_short_description_key"
  Detail: Key (short_description)=(PNG) already exists.

Vanilla DSpace add a flyway script where the image/png was updated to PNG V7.6_2023.03.24__Update_PNG_in_bitstream_format_registry.sql and we already have PNG record in the database from the CLARIN-DSpace 5 database, so the DB cannot be updated following the new flyway script.

milanmajchrak commented 7 months ago

This error has occurred only once when we were upgrading from 7.5. to 7.6.1. and there were some data in the database. It won't happen anymore because the database migrate force command is called before every data import and it prepares the DSpace database with the right image/png shortdescription.