dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #28897
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14514: Remove sql file to create option-set from tei attribute options.
------------------------------------------------------------
revno: 14514
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-03-28 16:31:48 +0700
message:
Remove sql file to create option-set from tei attribute options.
removed:
resources/sql/create-optionset-from-tei-attribute-option.sql
modified:
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-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 2014-03-28 08:36:47 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java 2014-03-28 09:31:48 +0000
@@ -290,7 +290,8 @@
executeSql( "update datavalue set storedby='aggregated_from_tracker' where storedby='DHIS-System'" );
executeSql( "ALTER TABLE trackedentityattribute DROP COLUMN groupBy" );
-
+
+ executeSql( "update trackedentityattribute set valuetype='string' where valuetype='combo' and optionsetid is null" );
}
// -------------------------------------------------------------------------
=== removed file 'resources/sql/create-optionset-from-tei-attribute-option.sql'
--- resources/sql/create-optionset-from-tei-attribute-option.sql 2014-03-19 06:44:30 +0000
+++ resources/sql/create-optionset-from-tei-attribute-option.sql 1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
-INSERT INTO optionset ( optionsetid, name, lastupdated, created, version )
-select nextval('hibernate_sequence'), name || '_' || uid, now(), now(), 1 from trackedentityattribute where valuetype='combo';
-
-
-INSERT INTO optionsetmembers ( optionsetid, optionvalue, sort_order )
-select opt.optionsetid, teo.name,teo.trackedentityattributeoptionid from trackedentityattribute tea inner join trackedentityattributeoption teo
-on tea.trackedentityattributeid=teo.trackedentityattributeid
-inner join optionset opt on opt.name=tea.name || '_' || tea.uid;
\ No newline at end of file