dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #42419
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21694: Added startup statement for attribute.isunique
------------------------------------------------------------
revno: 21694
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2016-01-11 18:41:23 +0100
message:
Added startup statement for attribute.isunique
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/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 2016-01-09 23:53:09 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2016-01-11 17:41:23 +0000
@@ -247,14 +247,6 @@
// minmaxdataelement query index
executeSql( "CREATE INDEX index_minmaxdataelement ON minmaxdataelement( sourceid, dataelementid, categoryoptioncomboid )" );
- // add mandatory boolean field to patientattribute
- executeSql( "ALTER TABLE patientattribute ADD mandatory bool" );
-
- if ( executeSql( "ALTER TABLE patientattribute ADD groupby bool" ) >= 0 )
- {
- executeSql( "UPDATE patientattribute SET groupby=false" );
- }
-
// update periodType field to ValidationRule
executeSql( "UPDATE validationrule SET periodtypeid = (SELECT periodtypeid FROM periodtype WHERE name='Monthly') WHERE periodtypeid is null" );
@@ -284,7 +276,6 @@
executeSql( "ALTER TABLE organisationunit DROP CONSTRAINT organisationunit_shortname_key" );
executeSql( "ALTER TABLE section DROP CONSTRAINT section_name_key" );
- executeSql( "UPDATE patientattribute set inheritable=false where inheritable is null" );
executeSql( "UPDATE dataelement SET aggregationtype='avg_sum_org_unit' where aggregationtype='average'" );
// revert prepare aggregate*Value tables for offline diffs
@@ -761,6 +752,8 @@
executeSql( "UPDATE attribute SET documentattribute=false WHERE documentattribute IS NULL" );
executeSql( "UPDATE attribute SET optionattribute=false WHERE optionattribute IS NULL" );
executeSql( "UPDATE attribute SET optionsetattribute=false WHERE optionsetattribute IS NULL" );
+
+ executeSql( "update attribute set isunique=false where isunique is null" );
executeSql( "ALTER TABLE trackedentityattributedimension DROP COLUMN operator" );
executeSql( "ALTER TABLE trackedentitydataelementdimension DROP COLUMN operator" );