Project

General

Profile

Revision c27ce9cc

IDc27ce9ccee84fcadde2f730ba869475ed1c1b4f1
Parent 0761f817
Child 4e5c4e73

Added by Andreas Müller 12 months ago

ref #6794 update script for graph_id and root_id

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/v50_55/SchemaUpdater_55_551.java
24 24
import eu.etaxonomy.cdm.database.update.TableNameChanger;
25 25

  
26 26
/**
27
/**
28 27
 * @author a.mueller
29
 * @date 09.06.2017
30
 *
28
 * @date 01.03.2019
31 29
 */
32 30
public class SchemaUpdater_55_551 extends SchemaUpdaterBase {
33 31

  
......
85 83
       step = ColumnAdder.NewDTYPEInstance(stepName, tableName, "TermTreeNode", INCLUDE_AUDIT) ;
86 84
       stepList.add(step);
87 85

  
88
       //#6794 change featuretree_id to termtree_id
89
       stepName = "change featuretree_id to termtree_id";
86
       //#6794 change featuretree_id to graph_id
87
       stepName = "change featuretree_id to graph_id";
90 88
       tableName = "TermRelation";
91 89
       String oldColumnName = "featureTree_id";
92
       newColumnName = "termTree_id";
90
       newColumnName = "graph_id";
93 91
       step = ColumnNameChanger.NewIntegerInstance(stepName, tableName, oldColumnName, newColumnName, INCLUDE_AUDIT);
94 92
       stepList.add(step);
95 93

  
96
       //#6794 change featuretree_id to termtree_id
94
       //#6794 change feature_id to term_id
97 95
       stepName = "change feature_id to term_id";
98 96
       tableName = "TermRelation";
99 97
       oldColumnName = "feature_id";
......
205 203
       step = TableNameChanger.NewInstance(stepName, oldName, newName, INCLUDE_AUDIT, includeDtype);
206 204
       stepList.add(step);
207 205

  
208

  
209

  
210
        return stepList;
206
       //#6794 add root_id column to TermCollection
207
       stepName = "add root_id column to TermCollection";
208
       tableName = "TermCollection";
209
       newColumnName = "root_id";
210
       step = ColumnAdder.NewIntegerInstance(stepName, tableName, newColumnName, INCLUDE_AUDIT, !NOT_NULL, "TermRelation");
211
       stepList.add(step);
212
       return stepList;
211 213

  
212 214
	}
213 215

  
......
241 243
        step = SimpleSchemaUpdaterStep.NewAuditedInstance(stepName, query, tableName, -99);
242 244
        stepList.add(step);
243 245

  
246

  
244 247
    }
245 248

  
246 249

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)