CDLUC3 / dmptool

DMPTool version of the DMPRoadmap codebase
https://dmptool.org
MIT License
57 stars 13 forks source link

Upgrading from 4.01 version to 4.07 version #460

Closed rwvaldivia closed 1 year ago

rwvaldivia commented 1 year ago

My team will start upgrade versions to dmptool. After reading the release version at https://github.com/CDLUC3/dmptool/releases , I noticed that there doesn't seem to have been any changes in the database.

To make each of the updates, just update the source code (of course taking care with my own customizations)? isn't there a rake routine or some seed routine to run between versions?

briri commented 1 year ago

Hi @rwvaldivia, yes, there are Rake tasks for some version upgrades. They are typically used to seed new database structures or to migrate data. We have not had any changes though that required this recently, so simply pulling down the latest code should be enough.

You should always run bin/rails db:migrate when you upgrade though! Not every DB change requires seed data (e.g. when we added research_outputs the table was empty until users started filling out the form).

If there are any Rake migrations that need to be run, we will make a note of it in the release notes.

The typical approach in the past was to keep all of the major version upgrade tasks in the same file. For example, lib/tasks/v3.rake had many such migration tasks that needed to occur in the v3 releases. We tried to make each one specific to whatever upgrade it was associated with (e.g. bin/rails v3: upgrade_3_1_0). There will be a migration script in one of the next releases.