-
Notifications
You must be signed in to change notification settings - Fork 117
Upgrading from DMPonline_v4
Please follow these instructions to upgrade from the DMPonline_v4 codebase. Once you have completed these steps you will be able to run the application directly from the master branch of this repository or via one of our packaged releases (recommended).
Notes:
- It may be necessary for you to comment out either the
pgormysql2gems from within the Gemfile depending on which database you use for each of the steps below. - The db/schema.rb or Gemfile.lock files may change during each step of the migration process. Running
git stashafter running each section's upgrade steps will allow you to move on to the next phase. - If you have multiple database instances defined in your config/database.yml file, you will want to specify the environment in the rake commands below by appending the environment to the end of each rake task. (e.g.
rake db:migrate RAILS_ENV=development)
- Clone this repository
- Copy in the config/database.yml from your current DMPOnline_v4 codebase into the new DMPRoadmap code
-
Make a backup of your database(s)! (e.g. for mysql perform a:
mysqldump roadmap --single-transaction --routines=0 --triggers=0 --no-create-db -h[hostname] -u[username] -p > tmp/[environment]_backup_[today].sqlor contact your database administrator for assistance)
Tasks: transition to Rails 4.2, new user permissions and seed new lookup tables
git fetch --allgit checkout dmponline4_upgrade_step1-
git pull origin dmponline4_upgrade_step1This is not necessary if you have just cloned the repo - Comment out the
pgormysql2gem in the Gemfile if necessary bundle installrake db:migraterake migrate:seedrake migrate:permissions-
rake migrate:data_integrityWARNING: this step will replace invalid user email addresses with a temporary email address. If it does, it will record the invalid email and the user info in thelog/migration.logfile. Please review this log after running the script. You may need to contact the user or their organisational admin to get their correct email address. If this file is empty or missing that means that no invalid email addresses were found and all data migrated successfully. git stash
Tasks: transformation from dmptemplate-phase-version-section-question to template-phase-section-question and project-plan-section-answer to plan-answer table hierarchies
git checkout dmponline4_upgrade_step2-
git pull origin dmponline4_upgrade_step2This is not necessary if you have just cloned the repo - Comment out the
pgormysql2gem in the Gemfile if necessary -
rake db:migrate(can take over 10 minutes depending on size of your database) git stash
Tasks: cleanup of temporary structures used in transformation process
git checkout dmponline4_upgrade_step3-
git pull origin dmponline4_upgrade_step3This is not necessary if you have just cloned the repo - Comment out the
pgormysql2gem in the Gemfile if necessary rake db:migrategit stash
Once you have finished the upgrade process you will need to switch to the master branch and run through any further migrations that may have been introduced since January 2017.
git checkout master-
git pull origin masterThis is not necessary if you have just cloned the repo - Comment out the
pgormysql2gem in the Gemfile if necessary cp config/branding_example.yml config/branding.yml- Update the
config/branding.ymlfile with your organization's information - Copy over the following files from your old DMPonline_v4 directory into the DMPRoadmap directory. If you do not have these files in your old DMPonline_v4 directory you can simply copy the examples provided.
config/secrets.ymlconfig/initializers/devise.rbconfig/initializers/recaptcha.rbconfig/initializers/wicked_pdf.rb
- Update your
config/initializers/recaptcha.rbfile to match the layout inconfig/initializers/recaptcha.rb.example. The recaptcha gem has been updated and the attribute names have changed. rake db:migraterake migrate:fix_languages
- If you receive complaints about the rake version just prefix the command with
bundle exec. This will ensure that the command uses the version of rake defined in the Gemfile.lock (e.g.bundle exec rake db:migrate)
Gem::LoadError: You have already activated rake 12.0.0, but your Gemfile requires rake 11.3.0. Prepending `bundle exec` to your command may solve this.- If you receive an error message during migration about Recaptcha and an undefined method called
site_key, you should open yourconfig/initializers/recaptcha.rband comment out the lines. The older code base that we begin the migration from uses an old version of the Recaptcha gem that uses apublic_keymethod. When you are done with the migration, reopen this file and uncomment the lines!
- Home
- About
- Contributing
- Releases
- Themes
- Google Analytics
- Translations
- Developer guide
- Reporting Issues

