← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16306: Temp fix

 

------------------------------------------------------------
revno: 16306
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-08-04 15:40:10 +0200
message:
  Temp fix
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	2014-07-29 07:52:47 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2014-08-04 13:40:10 +0000
@@ -1167,29 +1167,7 @@
     private void updateOptionTbl()
     {
         executeSql( "INSERT INTO option( optionid, code, created, lastupdated, name, optionsetid, sort_order) "
-            + " select " + statementBuilder.getAutoIncrementValue() + ", optionvalue, now(), now() , optionvalue, optionsetid, ( sort_order + 1 ) "
+            + " select " + statementBuilder.getAutoIncrementValue() + ", optionvalue, now(), now(), optionvalue, optionsetid, ( sort_order + 1 ) "
             + " from optionsetmembers " );
-
-        StatementHolder holder = statementManager.getHolder();
-
-        try
-        {
-            Statement statement = holder.getStatement();
-            ResultSet resultSet = statement.executeQuery( "select optionid from option where uid is null" );
-
-            while ( resultSet.next() )
-            {
-                int id = resultSet.getInt( "optionid" );
-                String uid = CodeGenerator.generateCode();
-                executeSql( "UPDATE option SET uid='" + uid + "'  WHERE optionid=" + id );
-            }
-            
-            executeSql( "drop table optionsetmembers" );
-        }
-        catch ( Exception ex )
-        {
-            ex.printStackTrace();
-        }
     }
-
 }