dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #39389
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19936: introducing category and option combo to program / stage / instance - WIP
------------------------------------------------------------
revno: 19936
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-09-02 15:48:58 +0200
message:
introducing category and option combo to program / stage / instance - WIP
modified:
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/resources/org/hisp/dhis/program/hibernate/ProgramStageInstance.hbm.xml
--
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 05:19:09 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2015-09-02 13:48:58 +0000
@@ -727,6 +727,8 @@
executeSql( "UPDATE dataset SET version=0 WHERE version IS NULL" );
executeSql( "UPDATE program SET version=0 WHERE version IS NULL" );
executeSql( "update program set categorycomboid = " + defaultCategoryComboId + " where categorycomboid is null" );
+ executeSql( "update programstageinstance set attributeOptionCombo = " + defaultOptionComboId + " where attributeOptionCombo is null" );
+
executeSql( "ALTER TABLE datavalue ALTER COLUMN lastupdated TYPE timestamp" );
executeSql( "ALTER TABLE completedatasetregistration ALTER COLUMN date TYPE timestamp" );
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageInstance.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageInstance.hbm.xml 2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageInstance.hbm.xml 2015-09-02 13:48:58 +0000
@@ -25,6 +25,8 @@
<property name="dueDate" column="duedate" />
<property name="executionDate" column="executiondate" type="timestamp" index="programstageinstance_executiondate" />
+
+ <key-many-to-one name="attributeOptionCombo" class="org.hisp.dhis.dataelement.DataElementCategoryOptionCombo" column="attributeoptioncomboid" foreign-key="fk_programstageinstance_attributeoptioncomboid" />
<many-to-one name="organisationUnit"
class="org.hisp.dhis.organisationunit.OrganisationUnit" column="organisationunitid"