Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate CoreMetadata#physical_medium #format #1142

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

rococodogs
Copy link
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