Model Change Workflow » History » Revision 11
Revision 10 (Andreas Müller, 03/07/2019 03:05 PM) → Revision 11/17 (Andreas Müller, 03/07/2019 03:24 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 for H2 to see if it works in general * Run TestModelUpdate for a new MySQL database to see how the model is translated to DB (inspect via any DBMS) * Run 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) * If * Check for * ... hibernate annotations * JAXB annotations (on attribute and class level) * clone methods * other methods * write tests (for all layers) * write database update (persistence layer), also test that hibernate_sequences is up-to-date after updates * adapt testing data (xsd, xml, etc.) * run tests for all layers * 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