← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21423: Analytics tables. Using text instead of varchar(50000) which does not work well with mysql. Stop ...

 

------------------------------------------------------------
revno: 21423
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-12-11 13:39:59 +0100
message:
  Analytics tables. Using text instead of varchar(50000) which does not work well with mysql. Stop hiding exceptions produced by the create table statement.
modified:
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTableManager.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTargetTableManager.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcOrgUnitTargetTableManager.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-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java	2015-11-12 18:37:11 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcAnalyticsTableManager.java	2015-12-11 12:39:59 +0000
@@ -141,7 +141,7 @@
             sqlCreate += col[0] + " " + col[1] + ",";
         }
 
-        sqlCreate += "daysxvalue " + dbl + ", daysno integer not null, value " + dbl + ", textvalue varchar(50000)) ";
+        sqlCreate += "daysxvalue " + dbl + ", daysno integer not null, value " + dbl + ", textvalue text) ";
 
         sqlCreate += statementBuilder.getTableOptions( false );
 
@@ -149,7 +149,7 @@
 
         log.debug( "Create SQL: " + sqlCreate );
 
-        executeSilently( sqlCreate );
+        jdbcTemplate.execute( sqlCreate );
     }
 
     @Override

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTableManager.java	2015-09-17 14:51:08 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTableManager.java	2015-12-11 12:39:59 +0000
@@ -95,7 +95,7 @@
         
         log.debug( "Create SQL: " + sqlCreate );
         
-        executeSilently( sqlCreate );
+        jdbcTemplate.execute( sqlCreate );
     }
     
     @Override

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTargetTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTargetTableManager.java	2015-09-17 14:51:08 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcCompletenessTargetTableManager.java	2015-12-11 12:39:59 +0000
@@ -102,7 +102,7 @@
         
         log.debug( "Create SQL: " + sqlCreate );
         
-        executeSilently( sqlCreate );
+        jdbcTemplate.execute( sqlCreate );
     }
 
     @Override

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.java	2015-11-11 14:07:36 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcEventAnalyticsTableManager.java	2015-12-11 12:39:59 +0000
@@ -159,7 +159,7 @@
         
         log.debug( "Create SQL: " + sqlCreate );
         
-        executeSilently( sqlCreate );
+        jdbcTemplate.execute( sqlCreate );
     }
 
     @Async
@@ -407,7 +407,7 @@
         }
         else
         {
-            return "character varying(50000)";
+            return "text";
         }
     }
     

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcOrgUnitTargetTableManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcOrgUnitTargetTableManager.java	2015-09-17 14:51:08 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/JdbcOrgUnitTargetTableManager.java	2015-12-11 12:39:59 +0000
@@ -101,7 +101,7 @@
         
         log.debug( "Create SQL: " + sqlCreate );
         
-        executeSilently( sqlCreate );
+        jdbcTemplate.execute( sqlCreate );
     }
 
     @Override