Project

General

Profile

Download (2.33 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
 * Copyright (C) 2007 EDIT
4
 * European Distributed Institute of Taxonomy
5
 * http://www.e-taxonomy.eu
6
 *
7
 * The contents of this file are subject to the Mozilla Public License Version 1.1
8
 * See LICENSE.TXT at the top of this package for the full license terms.
9
 */
10

    
11
package eu.etaxonomy.cdm.database.update.v36_40;
12

    
13
import java.util.ArrayList;
14
import java.util.List;
15

    
16
import org.apache.log4j.Logger;
17

    
18
import eu.etaxonomy.cdm.database.update.ColumnAdder;
19
import eu.etaxonomy.cdm.database.update.ISchemaUpdater;
20
import eu.etaxonomy.cdm.database.update.ISchemaUpdaterStep;
21
import eu.etaxonomy.cdm.database.update.SchemaUpdaterBase;
22
import eu.etaxonomy.cdm.database.update.v35_36.SchemaUpdater_35_36;
23

    
24
/**
25
 * @author a.mueller
26
 * @created 16.04.2016
27
 */
28
public class SchemaUpdater_36_40 extends SchemaUpdaterBase {
29

    
30
	@SuppressWarnings("unused")
31
	private static final Logger logger = Logger.getLogger(SchemaUpdater_36_40.class);
32
	private static final String endSchemaVersion = "4.0.0.0.201604200000";
33
	private static final String startSchemaVersion = "3.6.0.0.201527040000";
34

    
35
	// ********************** FACTORY METHOD *************************************
36

    
37
	public static SchemaUpdater_36_40 NewInstance() {
38
		return new SchemaUpdater_36_40();
39
	}
40

    
41
	/**
42
	 * @param startSchemaVersion
43
	 * @param endSchemaVersion
44
	 */
45
	protected SchemaUpdater_36_40() {
46
		super(startSchemaVersion, endSchemaVersion);
47
	}
48

    
49
	@Override
50
	protected List<ISchemaUpdaterStep> getUpdaterList() {
51

    
52
		String stepName;
53
		String tableName;
54
		ISchemaUpdaterStep step;
55
//		String columnName;
56
		String newColumnName;
57
		String oldColumnName;
58
		String columnNames[];
59
		String referencedTables[];
60
		String columnTypes[];
61
//		boolean includeCdmBaseAttributes = false;
62

    
63
		List<ISchemaUpdaterStep> stepList = new ArrayList<ISchemaUpdaterStep>();
64

    
65
        //#5606
66
        //Add preferred stable URI to SpecimenOrObservation
67
        stepName = "Add preferred stable URI to SpecimenOrObservation";
68
        tableName = "SpecimenOrObservationBase";
69
        newColumnName = "preferredStableUri";
70
        step = ColumnAdder.NewClobInstance(stepName, tableName, newColumnName, INCLUDE_AUDIT);
71
        stepList.add(step);
72

    
73
		return stepList;
74
	}
75

    
76

    
77
	@Override
78
	public ISchemaUpdater getNextUpdater() {
79
		return null;
80
	}
81

    
82
	@Override
83
	public ISchemaUpdater getPreviousUpdater() {
84
		return SchemaUpdater_35_36.NewInstance();
85
	}
86

    
87
}
(1-1/2)