← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19939: Removing data mart tables

 

------------------------------------------------------------
revno: 19939
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-09-02 16:22:03 +0200
message:
  Removing data mart tables
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-09-02 13:48:58 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2015-09-02 14:22:03 +0000
@@ -28,13 +28,19 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import java.sql.ResultSet;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 import org.amplecode.quick.BatchHandler;
 import org.amplecode.quick.BatchHandlerFactory;
 import org.amplecode.quick.StatementHolder;
 import org.amplecode.quick.StatementManager;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.hisp.dhis.dataelement.DataElementService;
 import org.hisp.dhis.jdbc.StatementBuilder;
 import org.hisp.dhis.jdbc.batchhandler.RelativePeriodsBatchHandler;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
@@ -43,13 +49,6 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.sql.ResultSet;
-import java.sql.Statement;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 /**
  * @author Lars Helge Overland
  */
@@ -843,6 +842,20 @@
         executeSql( "update categoryoptiongroupset set datadimensiontype = 'DISAGGREGATION' where datadimensiontype is null" );
         executeSql( "update categoryoptiongroup set datadimensiontype = 'DISAGGREGATION' where datadimensiontype is null" );
 
+        // Remove data mart
+        executeSql( "drop table aggregateddatasetcompleteness" );
+        executeSql( "drop table aggregateddatasetcompleteness_temp" );
+        executeSql( "drop table aggregateddatavalue" );
+        executeSql( "drop table aggregateddatavalue_temp" );
+        executeSql( "drop table aggregatedindicatorvalue" );
+        executeSql( "drop table aggregatedindicatorvalue_temp" );
+        executeSql( "drop table aggregatedorgunitdatasetcompleteness" );
+        executeSql( "drop table aggregatedorgunitdatasetcompleteness_temp" );
+        executeSql( "drop table aggregatedorgunitdatavalue" );
+        executeSql( "drop table aggregatedorgunitdatavalue_temp" );
+        executeSql( "drop table aggregatedorgunitindicatorvalue" );
+        executeSql( "drop table aggregatedorgunitindicatorvalue_temp" );
+        
         oauth2();
 
         upgradeDataValuesWithAttributeOptionCombo();