← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16869: Changed CategoryOption.startDate and endDate from timestamp to date. No need for ms precision for...

 

------------------------------------------------------------
revno: 16869
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-09-29 23:40:40 +0200
message:
  Changed CategoryOption.startDate and endDate from timestamp to date. No need for ms precision for validity spans.
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/dataelement/hibernate/DataElementCategoryOption.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	2014-09-29 18:29:02 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2014-09-29 21:40:40 +0000
@@ -742,6 +742,9 @@
         executeSql( "alter table expression alter column missingvaluestrategy set not null" );
         executeSql( "alter table expression drop column nullifblank" );
 
+        executeSql( "alter table dataelementcategoryoption alter column startdate type date" );
+        executeSql( "alter table dataelementcategoryoption alter column enddate type date" );
+        
         executeSql( "alter table dataelement drop column sortorder" );
         executeSql( "alter table indicator drop column sortorder" );
         executeSql( "alter table dataset drop column sortorder" );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategoryOption.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategoryOption.hbm.xml	2014-06-12 16:43:46 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategoryOption.hbm.xml	2014-09-29 21:40:40 +0000
@@ -17,9 +17,9 @@
 
     <property name="name" column="name" not-null="true" unique="true" length="230" />
 
-    <property name="startDate" type="timestamp" />
+    <property name="startDate" type="date" />
 
-    <property name="endDate" type="timestamp" />
+    <property name="endDate" type="date" />
 
     <set name="organisationUnits" table="categoryoption_organisationunits">
       <cache usage="read-write" />