Skip to content

Upgrading from DMPonline_v4

Brian Riley edited this page Mar 14, 2017 · 44 revisions

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 pg or mysql2 gems 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 stash after 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)

Pre-upgrade:

  • 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 --single-transaction --routines=0 --triggers=0 --no-create-db -h[hostname] -u[username] -p > tmp/[environment]_backup_[today].sql or contact your database administrator for assistance)

Upgrade Step 1

Tasks: transition to Rails 4.2, new user permissions and seed new lookup tables

  • git fetch --all
  • git checkout dmponline4_upgrade_step1
  • Comment out the pg or mysql2 gem in the Gemfile if necessary
  • bundle install
  • rake db:migrate
  • rake migrate:seed
  • rake migrate:permissions
  • rake migrate:data_integrity
  • git stash

Upgrade Step 2:

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
  • Comment out the pg or mysql2 gem in the Gemfile if necessary
  • rake db:migrate (can take over 10 minutes depending on size of your database)
  • git stash

Upgrade Step 3:

Tasks: cleanup of temporary structures used in transformation process

  • git checkout dmponline4_upgrade_step3
  • Comment out the pg or mysql2 gem in the Gemfile if necessary
  • rake db:migrate
  • git stash

Post-upgrade

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
  • Comment out the pg or mysql2 gem in the Gemfile if necessary
  • rake db:migrate

Clone this wiki locally