dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #29179
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14701: Added uid to _orgunitstructure table
------------------------------------------------------------
revno: 14701
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2014-04-06 15:41:19 +0200
message:
Added uid to _orgunitstructure table
modified:
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/DefaultResourceTableService.java
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/jdbc/JdbcResourceTableStore.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-administration/src/main/java/org/hisp/dhis/resourcetable/DefaultResourceTableService.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/DefaultResourceTableService.java 2014-04-06 11:19:24 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/DefaultResourceTableService.java 2014-04-06 13:41:19 +0000
@@ -173,6 +173,7 @@
List<Object> values = new ArrayList<Object>();
values.add( unit.getId() );
+ values.add( unit.getUid() );
values.add( level );
Map<Integer, Integer> identifiers = new HashMap<Integer, Integer>();
@@ -196,7 +197,7 @@
}
}
- resourceTableStore.batchUpdate( ( maxLevel * 2 ) + 2, TABLE_NAME_ORGANISATION_UNIT_STRUCTURE, batchArgs );
+ resourceTableStore.batchUpdate( ( maxLevel * 2 ) + 3, TABLE_NAME_ORGANISATION_UNIT_STRUCTURE, batchArgs );
log.info( "Organisation unit structure table generated" );
}
=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/jdbc/JdbcResourceTableStore.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/jdbc/JdbcResourceTableStore.java 2014-04-06 11:19:24 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/jdbc/JdbcResourceTableStore.java 2014-04-06 13:41:19 +0000
@@ -118,7 +118,7 @@
StringBuilder sql = new StringBuilder();
sql.append( "CREATE TABLE " ).append( TABLE_NAME_ORGANISATION_UNIT_STRUCTURE ).
- append( " ( organisationunitid INTEGER NOT NULL PRIMARY KEY, level INTEGER" );
+ append( " ( organisationunitid INTEGER NOT NULL PRIMARY KEY, organisationunituid CHARACTER(11), level INTEGER" );
for ( int k = 1 ; k <= maxLevel; k++ )
{