← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13148: Changed data type for patientdatavalue.timestamp from date to timestamp

 

------------------------------------------------------------
revno: 13148
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-12-04 19:28:32 +0100
message:
  Changed data type for patientdatavalue.timestamp from date to timestamp
modified:
  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/resources/org/hisp/dhis/patientdatavalue/hibernate/PatientDataValue.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-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	2013-12-02 17:37:32 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java	2013-12-04 18:28:32 +0000
@@ -270,7 +270,9 @@
         executeSql( "ALTER TABLE patientaggregatereport DROP COLUMN facilityLB" );
         executeSql( "update programstage_dataelements set allowDateInFuture=false where allowDateInFuture is null" );
         executeSql( "update programstage set autoGenerateEvent=true where programid in ( select programid from program where type=2 )" );
-        executeSql( "alter table patient alter column organisationunitid set not null" );
+        executeSql( "alter table patient alter column organisationunitid set not null" );        
+
+        executeSql( "ALTER TABLE patientdatavalue ALTER COLUMN timestamp TYPE timestamp" );
         
         updateCoordinatesProgramStageInstance();
     }

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patientdatavalue/hibernate/PatientDataValue.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patientdatavalue/hibernate/PatientDataValue.hbm.xml	2012-07-10 06:06:52 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patientdatavalue/hibernate/PatientDataValue.hbm.xml	2013-12-04 18:28:32 +0000
@@ -15,7 +15,7 @@
     
     <property name="value" />
 
-    <property name="timestamp" type="date" />
+    <property name="timestamp" type="timestamp" />
     
     <property name="providedElsewhere" />