← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11228: Fixed issue with startup routine. Copying filters from chart to chart_filters table before upgrad...

 

------------------------------------------------------------
revno: 11228
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-06-19 14:24:58 +0200
message:
  Fixed issue with startup routine. Copying filters from chart to chart_filters table before upgrading dimension identifiers. 
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	2013-06-05 12:02:23 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2013-06-19 12:24:58 +0000
@@ -462,6 +462,13 @@
         executeSql( "update chart set userorganisationunitchildren = false where userorganisationunitchildren is null" );
         executeSql( "update chart set userorganisationunit = false where userorganisationunit is null" );
         executeSql( "update chart set hidetitle = false where hidetitle is null" );
+
+        // Move chart filters to chart_filters table
+        
+        executeSql( "insert into chart_filters (chartid, sort_order, filter) select chartid, 0, filter from chart" );
+        executeSql( "alter table chart drop column filter" );
+                
+        // Upgrade chart dimension identifiers
         
         executeSql( "update chart set series = 'dx' where series = 'data'" );
         executeSql( "update chart set series = 'pe' where series = 'period'" );
@@ -472,9 +479,6 @@
         executeSql( "update chart_filters set filter = 'dx' where filter = 'data'" );
         executeSql( "update chart_filters set filter = 'pe' where filter = 'period'" );
         executeSql( "update chart_filters set filter = 'ou' where filter = 'organisationunit'" );
-        
-        executeSql( "insert into chart_filters (chartid, sort_order, filter) select chartid, 0, filter from chart" );
-        executeSql( "alter table chart drop column filter" );
                 
         executeSql( "update users set selfregistered = false where selfregistered is null" );
         executeSql( "update users set disabled = false where disabled is null" );