sul-dlss / dor-services-app

A Rails application exposing Digital Object Registry functions as a RESTful HTTP API
https://sul-dlss.github.io/dor-services-app/
Other
3 stars 2 forks source link

Add a commit mode to migrate-cocina #5079

Closed aaron-collier closed 1 month ago

aaron-collier commented 1 month ago

Why was this change made? 🤔

Add a commit method to migrate-cocina so that we can save changes to RepositoryObjects, RepositoryObjectVersions, etc in the migration for use cases where we do not want to use the UpdateVersionService as that will not always work for prior versions.

This also adds autosave: true to the RepositoryObjectVersion association in RepositoryObject so that we do not require individual saves for versions.

How was this change tested? 🤨

Beyond existing unit tests, I tested this by running on stage.

âš¡ âš  If this change has cross service impact, including data writes to shared file systems, run integration tests and/or test in [stage|qa] environment, in addition to specs. âš¡