Project

General

Profile

Revision 5b113fbe

ID5b113fbe30953a9fbc6547d83402353ae5719276
Parent 5b34cfd9
Child f800c017

Added by Andreas Müller about 2 months ago

add base functionality for model update 5.15.2 -> 5.18.0

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/metadata/CdmMetaData.java
53 53
	 * be handled by SCHEMA_VALIDATION.UPDATE
54 54
	 * The last number represents the date of change.
55 55
	 */
56
	private static final String dbSchemaVersion = CdmVersion.V_05_15_02.versionString;
56
	private static final String dbSchemaVersion = CdmVersion.V_05_18_00.versionString;
57 57

  
58 58
	public enum CdmVersion {
59 59
	    V_05_12_00("5.12.0.0.20191202"),
60 60
        V_05_15_00("5.15.0.0.20200510"),
61 61
	    V_05_15_01("5.15.1.0.20200610"),
62
	    V_05_15_02("5.15.2.0.20200611")
63
	    ;
62
	    V_05_15_02("5.15.2.0.20200611"),
63
	    V_05_18_00("5.18.0.0.20200902")
64
        ;
64 65
        private String versionString;
65 66
	    private CdmVersion(String versionString){
66 67
	        this.versionString = versionString;
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/CdmUpdater.java
17 17
import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
18 18
import eu.etaxonomy.cdm.database.CdmDataSource;
19 19
import eu.etaxonomy.cdm.database.ICdmDataSource;
20
import eu.etaxonomy.cdm.database.update.v512_515.SchemaUpdater_5151_5152;
20
import eu.etaxonomy.cdm.database.update.v515_518.SchemaUpdater_5152_5180;
21 21
import eu.etaxonomy.cdm.model.metadata.CdmMetaData;
22 22

  
23 23
/**
......
73 73
     * @return the current CDM updater
74 74
     */
75 75
    private ISchemaUpdater getCurrentSchemaUpdater() {
76
        return SchemaUpdater_5151_5152.NewInstance();
76
        return SchemaUpdater_5152_5180.NewInstance();
77 77
    }
78 78

  
79 79
    /**
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/v512_515/SchemaUpdater_5151_5152.java
19 19
import eu.etaxonomy.cdm.database.update.ISchemaUpdaterStep;
20 20
import eu.etaxonomy.cdm.database.update.SchemaUpdaterBase;
21 21
import eu.etaxonomy.cdm.database.update.TableCreator;
22
import eu.etaxonomy.cdm.database.update.v515_518.SchemaUpdater_5152_5180;
22 23
import eu.etaxonomy.cdm.model.metadata.CdmMetaData.CdmVersion;
23 24

  
24 25
/**
......
265 266

  
266 267
    @Override
267 268
	public ISchemaUpdater getNextUpdater() {
268
		return null;
269
		return SchemaUpdater_5152_5180.NewInstance();
269 270
	}
270 271
}
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/v515_518/SchemaUpdater_5152_5180.java
1
/**
2
 * Copyright (C) 2007 EDIT
3
 * European Distributed Institute of Taxonomy
4
 * http://www.e-taxonomy.eu
5
 *
6
 * The contents of this file are subject to the Mozilla Public License Version 1.1
7
 * See LICENSE.TXT at the top of this package for the full license terms.
8
 */
9
package eu.etaxonomy.cdm.database.update.v515_518;
10

  
11
import java.util.ArrayList;
12
import java.util.List;
13

  
14
import org.apache.log4j.Logger;
15

  
16
import eu.etaxonomy.cdm.database.update.ISchemaUpdater;
17
import eu.etaxonomy.cdm.database.update.ISchemaUpdaterStep;
18
import eu.etaxonomy.cdm.database.update.SchemaUpdaterBase;
19
import eu.etaxonomy.cdm.database.update.v512_515.SchemaUpdater_5151_5152;
20
import eu.etaxonomy.cdm.model.metadata.CdmMetaData.CdmVersion;
21

  
22
/**
23
 * @author a.mueller
24
 * @date 02.09.2020
25
 */
26
public class SchemaUpdater_5152_5180 extends SchemaUpdaterBase {
27

  
28
	@SuppressWarnings("unused")
29
	private static final Logger logger = Logger.getLogger(SchemaUpdater_5152_5180.class);
30

  
31
	private static final CdmVersion startSchemaVersion = CdmVersion.V_05_15_02;
32
	private static final CdmVersion endSchemaVersion = CdmVersion.V_05_18_00;
33

  
34
// ********************** FACTORY METHOD *************************************
35

  
36
	public static SchemaUpdater_5152_5180 NewInstance() {
37
		return new SchemaUpdater_5152_5180();
38
	}
39

  
40
	protected SchemaUpdater_5152_5180() {
41
		super(startSchemaVersion.versionString(), endSchemaVersion.versionString());
42
	}
43

  
44
	@Override
45
	protected List<ISchemaUpdaterStep> getUpdaterList() {
46

  
47
		String stepName;
48
		String tableName;
49

  
50
		List<ISchemaUpdaterStep> stepList = new ArrayList<>();
51

  
52
		return stepList;
53
    }
54

  
55
    @Override
56
    public ISchemaUpdater getPreviousUpdater() {
57
        return SchemaUpdater_5151_5152.NewInstance();
58
    }
59

  
60
    @Override
61
	public ISchemaUpdater getNextUpdater() {
62
		return null;
63
	}
64
}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)