Uploaded image for project: 'RAML Module Builder'
  1. RAML Module Builder
  2. RMB-569

Drop fromModuleVersion and tOps from table section, use schema.json comparison instead

    XMLWordPrintable

    Details

    • Template:
    • Sprint:
      CP: sprint 87, CP: sprint 88
    • Development Team:
      Core: Platform

      Description

      Current situation:
      schema.json entries (tables, etc.) should have a fromModuleVersion property that is set or updated whenever a change is made to that entry.
      An entry cannot be removed, instead "tOps": "ADD" must be changed to "tOps": "DELETE".
      This is error prone because it is a manual task.
      Usability is bad because deleted entries have to stay in the schema.json forever.

      Solution:
      Drop fromModuleVersion and tOps.
      Save schema.json in the database. We already have the rmb_internal table that currently stores rmb and module version: https://github.com/folio-org/raml-module-builder/blob/v29.2.2/domain-models-runtime/src/main/resources/templates/db_scripts/main.ftl#L15
      On upgrade compare the old schema.json and the new schema.json and create, update and delete accordingly.

      Migration - How to initialize database schema.json entry
      Module developers can provide any number of old schema.json version files alongside the current schema.json, adding the Edelweiss version is suggested. For example mod-inventory-storage should add schema.json-18.2.3 alongside schema.json in src/main/resources/templates/db_scripts.
      If the database does not contain a schema.json then RMB upgrade will search for the schema.json-fromVersion file and initialize the database with it. If schema.json-fromVersion file is not found the old existing code for upgrading is used.
      After upgrading the new schema.json file is saved in the database.

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                julianladisch Julian Ladisch
                Reporter:
                julianladisch Julian Ladisch
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases