dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #11782
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3445: Fix bug: Error when showing PatientAttribute list.
------------------------------------------------------------
revno: 3445
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-04-22 15:01:29 +0700
message:
Fix bug: Error when showing PatientAttribute list.
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/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 2011-04-15 10:01:05 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2011-04-22 08:01:29 +0000
@@ -183,10 +183,7 @@
executeSql( "ALTER TABLE organisationunit DROP CONSTRAINT organisationunit_code_key" );
// add mandatory boolean field to patientattribute
- if ( executeSql( "ALTER TABLE patientattribute ADD mandatory bool" ) >= 0 )
- {
- executeSql( "UPDATE patientattribute SET mandatory=false" );
- }
+ executeSql( "ALTER TABLE patientattribute ADD mandatory bool" );
if ( executeSql( "ALTER TABLE patientattribute ADD groupby bool" ) >= 0){
executeSql( "UPDATE patientattribute SET groupby=false" );
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2011-03-31 01:55:06 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2011-04-22 08:01:29 +0000
@@ -71,6 +71,8 @@
updateDOBType();
+ executeSql( "UPDATE patientattribute SET mandatory = false WHERE mandatory is NULL" );
+
executeSql( "UPDATE program SET version = 1 WHERE version is NULL" );
updateDataSetMobileAttribute();