Skip to content

Migrate Between Adapters

Trey Pendragon edited this page Oct 25, 2017 · 2 revisions

An example of migrating between two Valkyrie adapters is given below:

fedora = Valkyrie::MetadataAdapter.find(:fedora)
postgres = Valkyrie::MetadataAdapter.find(:postgres)

fedora.query_service.find_all.each do |resource|
  postgres.persister.save(resource: resource)
end