Skip to content

migrate CoreMetadata#physical_medium #format#1142

Draft
rococodogs wants to merge 3 commits into
developfrom
physical_medium-to-format
Draft

migrate CoreMetadata#physical_medium #format#1142
rococodogs wants to merge 3 commits into
developfrom
physical_medium-to-format

Conversation

@rococodogs

Copy link
Copy Markdown
Member

to migrate values, run the following from a rails console:

ActiveFedora::Base.where(physical_medium: '[* TO *]').each do |work|
  work.format = work.format + work.physical_medium
  # work.physical_medium = []
end

note: before removing the property from our model mixin, be sure to clear out physical_medium values using work.physical_medium = []; this prevents the values from being persisted to fedora where they'd be unreachable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant