← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21773: add back update routine for Attribute.ValueType which was removed for some reason

 

------------------------------------------------------------
revno: 21773
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2016-01-18 10:51:00 +0700
message:
  add back update routine for Attribute.ValueType which was removed for some reason
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/InitTableAlteror.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/InitTableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/InitTableAlteror.java	2016-01-05 18:25:17 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/InitTableAlteror.java	2016-01-18 03:51:00 +0000
@@ -235,6 +235,17 @@
         executeSql( "update trackedentityattribute set valuetype='TEXT' where valuetype is null" );
 
         executeSql( "update optionset set valuetype='TEXT' where valuetype is null" );
+
+        executeSql( "update attribute set valuetype='TEXT' where valuetype='string'" );
+        executeSql( "update attribute set valuetype='LONG_TEXT' where valuetype='text'" );
+        executeSql( "update attribute set valuetype='BOOLEAN' where valuetype='bool'" );
+        executeSql( "update attribute set valuetype='DATE' where valuetype='date'" );
+        executeSql( "update attribute set valuetype='NUMBER' where valuetype='number'" );
+        executeSql( "update attribute set valuetype='INTEGER' where valuetype='integer'" );
+        executeSql( "update attribute set valuetype='INTEGER_POSITIVE' where valuetype='positive_integer'" );
+        executeSql( "update attribute set valuetype='INTEGER_NEGATIVE' where valuetype='negative_integer'" );
+        executeSql( "update attribute set valuetype='TEXT' where valuetype='option_set'" );
+        executeSql( "update attribute set valuetype='TEXT' where valuetype is null" );
     }
 
     private void upgradeProgramStageDataElements()