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.
UXPROD-1815 for details and the TC tech debt presentation: https://docs.google.com/presentation/d/1Cz5-xhvMdCdm7SXYLhIQE8KV9YIsQW1faNUIWmMANx8