Project

General

Profile

Actions

Model Change Workflow » History » Revision 12

« Previous | Revision 12/17 (diff) | Next »
Andreas Müller, 03/07/2019 03:34 PM


WORKFLOW for Changing CDM Model

  • Run all tests in current trunk

  • Have other projects (cdm-vaadin, cdmlib-apps) linking to cdmlib in your IDE (as project, not as library so renaming takes automatically place in these projects

  • Create (local) branches in cdmlib, cdm-vaadin and cdmlib-apps called cdm-x.x where x.x is the model version

  • Run all test in new branches

  • Adapt version number and create SchemaUpdater (should be simplified)

    • create new package in cdmlib-persistence/eu.etaxonomy.cdm.database.update for the new version
    • create new SchemaUpdater in this package (compare with older SchemaUpdaters)
    • link method getPreviousUpdater to last used SchemaUpdater, accordingly link last used SchemaUpdater with the new SchemaUpdater
    • in CdmUpdater set getCurrenSchemaUpdater to new SchemaUpdater
    • in new SchemaUpdater set startSchemaVersion with current value in CdmMetaData.dbSchemaVersion
    • in new SchemaUpdater set endSchemaVersion with new value, adapt CdmMetaData.dbSchemaVersion with exact same value (should represent the expected release date)
  • Change model, check for

    • hibernate annotations
    • JAXB annotations (on attribute and class level)
    • clone methods
    • other methods
  • Run appimport/eu.etaxonomy.cdm.test.function.TestModelUpdate in CREATE mode for H2 to see if it works in general

  • Run TestModelUpdate in CREATE mode for a new MySQL database to see how the model is translated to DB (inspect via any DBMS)

  • Run existing tests:

    • Adapt changes in cdmlib-test/src/main/resources/dbscripts.001-cdm.h2.sql (should be automated but was difficult with hibernate envers)
    • Adapt changes in cdmlib-test/src/main/resources/eu.etaxonomy.cdm.database.schema.dataset.dtd (don't know if this can be automated)
    • Adapt predefined database loadings in cdmlib-test/src/main/resources/eu.etaxonomy.cdm.database. NOTE: these need to be copied to according packages in cdmlib-persistence, cdmlib-service and cdmlib-io (should be adapted that it uses always files from cdmlib-test)
    • adapt test datasets
  • write new tests for all layers

  • run tests for all layers

  • write database update script in SchemaUpdater (see above), also test that hibernate_sequences is up-to-date after updates (still needed?)

    • test it

      • create DB with the old schema using appimport/eu.etaxonomy.cdm.test.function.TestModelUpdate in CREATE mode (also fills it with test data) and backup somewhere (for all database types, start with MySQL)
      • run TestModelUpdate in VALIDATE mode to test update script
  • test brach with applications (Taxonomic Editor, Data Portals) on local databases, including update script

  • test branch with applications (Taxonomic Editor, Data Portals) on developer server, including update script

  • integrate into trunk

  • test trunk with local database and developer server

  • create new milestone, move all open tickets to new milestone, close old milestone

  • roll-out Taxonomic Editor and CDM Server at the same time

  • update uml model

  • update project pages (java doc)

  • document on "What has changed" sites

Updated by Andreas Müller about 5 years ago · 12 revisions