-
Notifications
You must be signed in to change notification settings - Fork 124
Upgrade Hyrax 2.x to Hyrax 3
These instructions are based on release notes to hyrax 3.6.
- Update Gemfile to specify these gems:
gem ‘bundler'
gem 'active-fedora’
gem 'hyrax', '3.0.0'
gem 'dry-monads', '1.4.0'
gem 'puma', '~> 5.6'
gem 'psych', '< 4’
gem “okcomputer"
run bundle update
- Run Rails DB Migrations:
rails hyrax:install:migrations
If you have any Solrizer calls in your overwrites or test you will need to replace them with
ActiveFedora::Indexing
ActiveFedora.index_field_mapper
- Universal Viewer switching to YARN
yarn install or rake assets:precompile
- If you use RIIIF you will need to adjust initializer
config/initializers/hyrax.rb
config.iiif_image_url_builder = lambda do |file_id, base_url, size, format|
- TinyMCE Config File
Remove link from the call.
-
Using Diff Checkers and the Hyku left_v_right script : https://raw.githubusercontent.com/scientist-softserv/hyku-tools/main/bin/left_v_right. You can identify which files are only in the application, which files are only in the engine, and which files are in both. https://github.com/scientist-softserv/hyku-tools#reviewing-repositories
-
View Overwrites In many of our institutions we have view overwrites that make calls to methods that are no longer there.
def create_work_presenter
Deprecation.warn(self, "The `create_work_presenter` helper is deprecated " \
"for removal in Hyrax 3.0. The work selector has " \
"been removed the masthead in Hyrax 2.1.")
Hyrax::SelectTypeListPresenter.new(current_user)
end
in our toolbar view we pointed to the Hyrax Name Space instead of the ruby method.
i.e.
<% if Hyrax::SelectTypeListPresenter.new(current_user).many? %> INSTEAD OF
<% if create_work_presenter.many? %>
- Metadat Views for Multi_Value : The form views and edit_record fields need to be refactored to account for the new multi_value syntax. Multi-value should be moved into input_html.
app/views/records/edit_fields/_abstract.html.erb app/views/records/edit_fields/_right_notes.html.erb app/views/hyrax/base/_form.html.erb
<%= f.input key, input_html: { class: 'form-control', autocomplete: 'on', multiple: true }, required: f.object.required?(key) %>
INSTEAD OF
<%= f.input key, as: :multi_value, input_html: { class: 'form-control', autocomplete: 'on' }, required: f.object.required?(key) %>
-
Metadata Overwrites If you overwrite this file : app/models/concerns/hyrax/basic_metadata.rb you will need to add in these new Basic Fields
- Rights_Notes
- Abstract
- Alternative_Title
- Multiple v Singular
-
Database Sipity
SQLite3::ConstraintException: UNIQUE constraint failed: sipity_entities.proxy_for_global_id: INSERT INTO "sipity_entities" ("proxy_for_global_id", "workflow_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)
Share upgrade experience
Report on steps you took in addition to the above instructions