dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #38130
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19465: Simplified upgrade sql for tracked entity form
------------------------------------------------------------
revno: 19465
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-06-19 11:57:16 +0200
message:
Simplified upgrade sql for tracked entity form
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/InitTableAlteror.java
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/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/InitTableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/InitTableAlteror.java 2015-06-19 07:35:50 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/InitTableAlteror.java 2015-06-19 09:57:16 +0000
@@ -71,10 +71,6 @@
executeSql( "ALTER TABLE program DROP COLUMN displayonallorgunit" );
upgradeProgramStageDataElements();
-
- executeSql( "UPDATE program SET dataentryformid =(SELECT trackedentityform.dataentryformid FROM trackedentityform WHERE program.programid=trackedentityform.programid) " +
- "WHERE program.programid = (SELECT trackedentityform.programid FROM trackedentityform WHERE program.programid = trackedentityform.programid)" );
-// executeSql( "drop table trackedentityform");
}
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java 2015-04-21 18:14:12 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java 2015-06-19 09:57:16 +0000
@@ -310,6 +310,9 @@
executeSql( "drop index index_patientdatavalue" );
+ executeSql( "update program p set dataentryformid = (select dataentryformid from trackedentityform tf where tf.programid=p.programid limit 1)" );
+ executeSql( "drop table trackedentityform" );
+
updateProgramStageList();
updateProgramAttributeList();