← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18823: Minor

 

------------------------------------------------------------
revno: 18823
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-04-07 23:30:38 +0200
message:
  Minor
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.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/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2015-04-07 19:52:16 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2015-04-07 21:30:38 +0000
@@ -417,7 +417,6 @@
         executeSql( "update chart set hidesubtitle = false where hidesubtitle is null" );
         executeSql( "update chart set userorganisationunit = false where userorganisationunit is null" );
         executeSql( "update chart set hideemptyrows = false where hideemptyrows is null" );
-        executeSql( "update chart set aggregationtype = 'DEFAULT' where aggregationtype is null" );
         executeSql( "update indicator set annualized = false where annualized is null" );
         executeSql( "update indicatortype set indicatornumber = false where indicatornumber is null" );
         executeSql( "update dataset set mobile = false where mobile is null" );
@@ -473,7 +472,6 @@
         executeSql( "update reporttable set sortorder = 0 where sortorder is null" );
         executeSql( "update reporttable set toplimit = 0 where toplimit is null" );
         executeSql( "update reporttable set showhierarchy = false where showhierarchy is null" );
-        executeSql( "update reporttable set aggregationtype = 'DEFAULT' where aggregationtype is null" );
 
         // reporttable col/row totals = keep existing || copy from totals || true
         executeSql( "update reporttable set totals = true where totals is null" );
@@ -821,6 +819,7 @@
         updateOptions();
         
         upgradeAggregationType( "reporttable" );
+        upgradeAggregationType( "chart" );
         
         updateRelativePeriods();
 
@@ -835,7 +834,7 @@
         executeSql( "update " + table + " set aggregationtype='VARIANCE' where aggregationtype='variance'" );
         executeSql( "update " + table + " set aggregationtype='MIN' where aggregationtype='min'" );
         executeSql( "update " + table + " set aggregationtype='MAX' where aggregationtype='max'" );
-        executeSql( "update " + table + " set aggregationtype='DEFAULT' where aggregationtype='default'" );
+        executeSql( "update " + table + " set aggregationtype='DEFAULT' where aggregationtype='default' or aggregationtype is null" );
     }
 
     private void updateRelativePeriods()