[FOLIO-2169] SPIKE investigate schema migrations in platform-core storage modules Created: 16/Jul/19  Updated: 03/Jun/20  Resolved: 23/Aug/19

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Task Priority: P3
Reporter: Jakub Skoczen Assignee: Taras Spashchenko
Resolution: Done Votes: 0
Labels: platform-backlog
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Blocks
blocks UXPROD-1815 support for upgrading schemas without... Closed
blocks UXPROD-2120 support for upgrading schemas without... Closed
Sprint: CP: sprint 70, CP: sprint 69, CP: sprint 68
Story Points: 5
Development Team: Core: Platform

 Description   

Problem statement

FOLIO offers the following facilities for schema upgrades:

  • Okapi offers hooks for performing modules upgrades (from version A to version B) that may include data migrations
  • RMB offers automatic DB migrations based on fromModuleVersion settings in schema.json and allows attaching custom SQL scripts to those migrations

What has not been sufficiently tested and verified is the complete flow for performing a module upgrade in a running FOLIO environment that includes a, potentially breaking, schema change.

This process should include automatic migration of the existing data (stored in JSON document format) and migration of any DB entities (tables, columns, views, indices, etc).

The upgrade procedure should allow for a safe upgrade – it should be possible to restore original data in case the migration goes wrong.

See UXPROD-1815 Closed for details and the TC tech debt presentation: https://docs.google.com/presentation/d/1Cz5-xhvMdCdm7SXYLhIQE8KV9YIsQW1faNUIWmMANx8



 Comments   
Comment by Jakub Skoczen [ 01/Aug/19 ]

Taras' document: https://docs.google.com/document/d/1z6rgZK6EVERzRsvTnTKrCHeE5odaNoSJZqVyipuaEFM/edit?pli=1#

Comment by Julian Ladisch [ 16/Aug/19 ]

Many modules are based on RMB.
Some are not:

The documentation should mention what migration task are needed for all Okapi modules and which are specific for RMB based modules. There are several way to accomplish this, one possibility is to add the general tasks to the Okapi documentation and the RMB specific tasks to the RMB documentation, with a link to each other.

Comment by Taras Spashchenko [ 23/Aug/19 ]

https://github.com/folio-org/raml-module-builder/blob/master/DB-schema-migration.md

Generated at Thu Feb 08 23:18:43 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.