Uniqueness on code properties

Hi,

just to inform you that we have again made the code fields of
dataelement, indicator and organisationunit tables unique. It will be
part of the 2.5 release.

Dropping the uniqueness constraints was admittedly a mistake.

The constraints will automatically be put back by the application.
However, if you have records in the mentioned tables with duplicate
codes, the constraints will not be created and you will have to:

1. Resolve the records with duplicate codes. You can discover
duplicates with the following SQL query:

select * from organisationunit where code in (
select code from organisationunit group by code having count(code) > 1)
order by code;

(Replace organisationunit with dataelement or indicator)

2. Restart DHIS.

I will re-post a reminder when we have released version 2.5.

regards,

Lars