dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #22166
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10632: Made domaintype property on data element not null
------------------------------------------------------------
revno: 10632
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-04-19 12:20:01 +0200
message:
Made domaintype property on data element not null
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/DataElement.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 2013-04-04 14:30:43 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2013-04-19 10:20:01 +0000
@@ -558,6 +558,8 @@
executeSql( "UPDATE chart SET publicaccess='--------' WHERE user IS NULL AND publicaccess IS NULL;" );
executeSql( "UPDATE map SET publicaccess='-------' WHERE user IS NULL AND publicaccess IS NULL;" );
+ executeSql( "ALTER TABLE dataelement ALTER COLUMN domaintype SET NOT NULL" );
+
log.info( "Tables updated" );
}
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElement.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElement.hbm.xml 2013-04-06 16:42:12 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElement.hbm.xml 2013-04-19 10:20:01 +0000
@@ -31,7 +31,7 @@
<property name="textType" column="textType" length="16" />
- <property name="domainType" column="domaintype" length="16" />
+ <property name="domainType" not-null="true" column="domaintype" length="16" />
<property name="aggregationOperator" not-null="true" column="aggregationtype" length="16" />