Project

General

Profile

Actions

WORKFLOW for Changing CDM Model

Describes the steps required when changing the CDM Model


  • Run all tests in current trunk successfully

  • Have other projects (cdm-vaadin, cdmlib-apps) directly linking to cdmlib in your IDE (as project, not as library so if you rename something it automatically happens in these projects, too)

  • 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, e.g. SchemaUpdater_5330_5350)
    • 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 last value in CdmMetaData.CdmVersion
    • create a new entry in CdmMetaData.CdmVersion and adapt the version string accordingly (last value represents the current date)
    • in new SchemaUpdater set endSchemaVersion to new CdmMetaData.CdmVersion value
  • 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 over 1 year ago · 17 revisions