This repository has been archived by the owner on Nov 26, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
sufia 6 to 7 upgrade notes
hackmastera edited this page Feb 28, 2017
·
1 revision
Resources
- code migration
- https://github.com/psu-stewardship/scholarsphere/wiki/Migration-to-PCDM
- https://github.com/projecthydra/sufia/issues/1751
- data migration
- https://github.com/projecthydra/sufia/issues/997
- https://github.com/projecthydra/sufia/wiki/Sufia-6-to-Sufia-7-Migration
- codebases
- https://github.com/aic-collections/aicdams-lakeshore
- https://github.com/projecthydra-labs/lerna
- wiki pages
- https://github.com/projecthydra/sufia/wiki/Customizing-Metadata
Steps (upgrading on a new box)
- Build box using our ansible scripts, omitting the last role (app-config). Don't bother starting apache.
- Check out our repo.
- bundle install
- run tests.
- upgrade rails to at least 4.2.6
- update gemfile:
- sufia master
- use kaminari_route_prefix instead of jcoyne's fork of Kaminari
- remove any pinned versions of Hydra-based gems
- add gem 'resque-pool'
- general clean-up
- bundle update
- remove unused config options in
config/intializers/sufia.rb
- fits_to_desc_mapping (https://github.com/projecthydra/sufia/commit/18ff1012604d6fc8e52fe0a70bae1de2067b300e)
- queue (https://github.com/projecthydra/sufia/commit/350794743bfec2f56d25d60fdd759ac709fedd85)
- cc_licenses and resource_types both moved to authorities in curation concerns. You need to move them to config/authorities/ if you have overridden these (the files will be created for you when you install curation_concerns. note that if you're using non-schema.org URIs for resource types, you can put those in the id: field of the authority config file.
- from_email # contact form now uses the user-provided email address as the from address.
- note you can put curation_concerns overrides in sufia.rb since they get merged.
- Hey, there was a blacklight upgrade (5 to 6) in there. If you notice a complaint about
blacklight_for
in config/routes.rb here is the documentation on that upgrade. https://github.com/projectblacklight/blacklight/releases/tag/v6.0.0 - To avoid route and config errors in the next step:
- Delete all devise routes, blacklight routes, sufia routes, questioning_authority, hydraeditor, and root routes. You'll be left just with whatever you have added personally to the routes config.
- also add a newline at the end of config/initializers/mime_types.rb
- bundle exec rails g sufia:install
- this also runs sufia:upgrade700 generator
- sift through diffs
- personally i deleted all the solr_wrapper stuff since that's not part of my dev setup.
- when unsure, compare with sufia's .internal_test_app. also check your own git blame.
- bin/rake db:migrate RAILS_ENV=test
- bundle exec rails g sufia:work GenericWork
- or name it anything else you want.
- wraps curation_concerns:work, adds additional stuff.
- migrate GenericFile stuff to GenericWork locations
- models
- controllers
- note: projecthydra/sufia#1829 https://github.com/projecthydra/sufia/issues/1829
- specs
- this basically kicks off the process of moving all the code around as you run tests.
- If you had anything in app/views/records/show_fields you'll need to migrate that logic to app/renderers. Probably will subclass from CurationConcerns::Rendererers::AttributeRenderer.
- related files
- if you were using them, you'll need to roll your own now
- these were formally files uploaded in the same Batch (had the same batch_id)
- removed in Sufia 7
- forms
- subtle differences in overrides between batch_upload and batch_edit
- look through everything you overrode locally to delete unneeded stuff and update everything else
- questioning_authority is now included with sufia; configuration may be different if you had installed it locally.