Schema Upgrade Testing

Description

Process described on #releases channel here https://folio-project.slack.com/archives/CGPMHLX9B/p1590164280223800

wrote some documentation for doing this locally.

Ask if you have questions.

Environment

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Jason Savell September 24, 2020 at 4:54 PM

I'm sorry. I closed this prematurely after I misread your initial response.

I have since updated the schema.json to set the fromModuleVersion to 17.2.0 for departments related sections using branch https://github.com/folio-org/mod-users/pull/189 and have re-run the schema upgrade procedure.

The schema upgrade now completes successfully.

I've opened a PR for the needed changed to departments versioning:
https://github.com/folio-org/mod-users/pull/190

Marc Johnson September 24, 2020 at 3:51 PM

Is this issue closed because the it was possible to do a successful upgrade?

Bohdan Suprun September 24, 2020 at 11:27 AM

,

Thanks, yes. I believe this is the issue. RMB decides that the table and scripts are already applied because from module < current module version (however, I thought, mentioned in some PR that RMB does not pay attention to the fromModuleVersion for tables, so the table should be created if it does not exist regardless of the fromModuleVersion it has).

Marc Johnson September 24, 2020 at 10:52 AM

Thank you for discovering this issue.

I think has identified the cause.

The pull request which added departments was merged after the 17.1.0 release, which I believe makes the fromModuleVersion in that pull request incorrect.

As I understand it, RAML Module Builder will ignore any elements of the schema.json for a previous version of the module and hence the departments table would not be created.

I have issued a pull request to change the incorrect next version defined when mod-users was last released. After that, I believe the fromModuleVersion properties from the departments pull request need to be changed to 17.2.0.

does that fit with your hypothesis?

cc:

Jason Savell September 23, 2020 at 7:51 PM

When following the procedure laid out here: https://folio-org.atlassian.net/wiki/display/FOLIJET/How+to+test+data+migration+scripts+locally

To upgrade from 17.1.0 -> 17.1.1

I encountered an error when a schema upgrade script attempted to create and index for the departments table when no departments table existed:

Done

Details

Assignee

Reporter

Labels

Priority

Story Points

Sprint

Development Team

Prokopovych

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created August 24, 2020 at 11:35 AM
Updated September 24, 2020 at 4:54 PM
Resolved September 24, 2020 at 2:02 PM
TestRail: Cases
TestRail: Runs