dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #41864
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21369: Renamed db column programrule.condition to programrule.rulecondition
------------------------------------------------------------
revno: 21369
committer: Markus Bekken <markus.bekken@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-12-08 12:38:38 +0200
message:
Renamed db column programrule.condition to programrule.rulecondition
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/programrule/hibernate/ProgramRule.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-11-30 03:36:54 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2015-12-08 10:38:38 +0000
@@ -771,7 +771,11 @@
//update programruleaction:
executeSql( "ALTER TABLE programruleaction DROP COLUMN name" );
-
+
+ //update programrule
+ executeSql( "UPDATE programrule SET rulecondition = condition WHERE rulecondition IS NULL" );
+ executeSql( "ALTER TABLE programrule DROP COLUMN condition" );
+
// data approval
executeSql( "UPDATE dataapproval SET accepted=false WHERE accepted IS NULL" );
executeSql( "ALTER TABLE dataapproval ALTER COLUMN accepted SET NOT NULL" );
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/programrule/hibernate/ProgramRule.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/programrule/hibernate/ProgramRule.hbm.xml 2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/programrule/hibernate/ProgramRule.hbm.xml 2015-12-08 10:38:38 +0000
@@ -30,7 +30,7 @@
<one-to-many class="org.hisp.dhis.programrule.ProgramRuleAction" />
</set>
- <property name="condition" type="text" not-null="true" />
+ <property name="condition" column="rulecondition" type="text" not-null="false" />
<property name="priority" />