Project

General

Profile

ModelChangeWorkflow » History » Version 12

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

1 1 Andreas Müller
2 2 Andreas Müller
3 2 Andreas Müller
4 2 Andreas Müller
5 2 Andreas Müller
# 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 10 Andreas Müller
11 10 Andreas Müller
* Create (local) branches in cdmlib, cdm-vaadin and cdmlib-apps called cdm-x.x where x.x is the model version
12 10 Andreas Müller
13 10 Andreas Müller
* Run all test in new branches
14 10 Andreas Müller
15 9 Andreas Müller
* Adapt version number and create SchemaUpdater (should be simplified)
16 9 Andreas Müller
    * create new package in cdmlib-persistence/eu.etaxonomy.cdm.database.update for the new version
17 9 Andreas Müller
    * create new SchemaUpdater in this package (compare with older SchemaUpdaters)
18 9 Andreas Müller
    * 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 3 Andreas Müller
    * 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 1 Andreas Müller
23 11 Andreas Müller
* Change model, check for
24 1 Andreas Müller
25 1 Andreas Müller
  * hibernate annotations
26 1 Andreas Müller
27 1 Andreas Müller
  * JAXB annotations (on attribute and class level)
28 1 Andreas Müller
29 1 Andreas Müller
  * clone methods
30 1 Andreas Müller
31 1 Andreas Müller
  * other methods
32 11 Andreas Müller
33 11 Andreas Müller
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 12 Andreas Müller
* 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 1 Andreas Müller
    * Adapt changes in cdmlib-test/src/main/resources/eu.etaxonomy.cdm.database.schema.dataset.dtd  (don't know if this can be automated)
41 1 Andreas Müller
    * 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 12 Andreas Müller
        * run TestModelUpdate in VALIDATE mode to test update script
54 12 Andreas Müller
        
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 5 Andreas Müller
62 5 Andreas Müller
* integrate into trunk
63 5 Andreas Müller
64 5 Andreas Müller
* 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 6 Andreas Müller
68 4 Andreas Müller
* roll-out Taxonomic Editor and CDM Server at the same time
69 4 Andreas Müller
70 4 Andreas Müller
* update uml model
71 4 Andreas Müller
72 4 Andreas Müller
* update project pages (java doc)
73 4 Andreas Müller
74 4 Andreas Müller
* document on "What has changed" sites
75 4 Andreas Müller
76 3 Andreas Müller
77 3 Andreas Müller
 
Add picture from clipboard (Maximum size: 40 MB)