Project

General

Profile

Model Change Workflow » History » Version 12

Andreas Müller, 03/07/2019 03:34 PM

1 1 Andreas Müller
2 2 Andreas Müller
3
4
5
# WORKFLOW for Changing CDM Model
6 3 Andreas Müller
7 10 Andreas Müller
* Run all tests in current trunk
8 1 Andreas Müller
9 10 Andreas Müller
* 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
10
11
* Create (local) branches in cdmlib, cdm-vaadin and cdmlib-apps called cdm-x.x where x.x is the model version
12
13
* Run all test in new branches
14
15 9 Andreas Müller
* Adapt version number and create SchemaUpdater (should be simplified)
16
    * create new package in cdmlib-persistence/eu.etaxonomy.cdm.database.update for the new version
17
    * create new SchemaUpdater in this package (compare with older SchemaUpdaters)
18
    * link method getPreviousUpdater to last used SchemaUpdater, accordingly link last used SchemaUpdater with the new SchemaUpdater
19 3 Andreas Müller
    * in CdmUpdater set getCurrenSchemaUpdater to new SchemaUpdater
20
    * in new SchemaUpdater set startSchemaVersion with current value in CdmMetaData.dbSchemaVersion
21 1 Andreas Müller
    * in new SchemaUpdater set endSchemaVersion with new value, adapt CdmMetaData.dbSchemaVersion with exact same value (should represent the expected release date)
22
23 11 Andreas Müller
* Change model, check for
24 1 Andreas Müller
25
  * hibernate annotations
26
27
  * JAXB annotations (on attribute and class level)
28
29
  * clone methods
30
31
  * other methods
32 11 Andreas Müller
33
34 12 Andreas Müller
* Run appimport/eu.etaxonomy.cdm.test.function.TestModelUpdate in CREATE mode for H2 to see if it works in general
35
* Run TestModelUpdate in CREATE mode for a new MySQL database to see how the model is translated to DB (inspect via any DBMS)
36 11 Andreas Müller
37 12 Andreas Müller
* Run existing tests:
38 11 Andreas Müller
    
39 1 Andreas Müller
    * Adapt changes in cdmlib-test/src/main/resources/dbscripts.001-cdm.h2.sql  (should be automated but was difficult with hibernate envers)
40
    * Adapt changes in cdmlib-test/src/main/resources/eu.etaxonomy.cdm.database.schema.dataset.dtd  (don't know if this can be automated)
41
    * 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)
42 12 Andreas Müller
    * adapt test datasets
43 1 Andreas Müller
44 12 Andreas Müller
* write new tests for all layers
45 1 Andreas Müller
46 12 Andreas Müller
* run tests for all layers
47 1 Andreas Müller
48 12 Andreas Müller
* write database update script in SchemaUpdater (see above), also test that hibernate_sequences is up-to-date after updates (still needed?)
49 3 Andreas Müller
50 12 Andreas Müller
    * test it
51 3 Andreas Müller
52 12 Andreas Müller
        * 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)
53
        * run TestModelUpdate in VALIDATE mode to test update script
54
        
55 3 Andreas Müller
56 12 Andreas Müller
57 3 Andreas Müller
58 5 Andreas Müller
* test brach with applications (Taxonomic Editor, Data Portals) on local databases, including update script
59 1 Andreas Müller
60 5 Andreas Müller
* test branch with applications (Taxonomic Editor, Data Portals) on developer server, including update script
61
62
* integrate into trunk
63
64
* test trunk with local database and developer server
65 4 Andreas Müller
66 6 Andreas Müller
* create new milestone, move all open tickets to new milestone, close old milestone
67
68 4 Andreas Müller
* roll-out Taxonomic Editor and CDM Server at the same time
69
70
* update uml model
71
72
* update project pages (java doc)
73
74
* document on "What has changed" sites
75
76 3 Andreas Müller
77