← Back to team overview

dhis2-devs team mailing list archive

Shortnames and uniqueness [Was: Zero export]

 

On Thu, Nov 5, 2009 at 10:35 AM, Knut Staring <knutst@xxxxxxxxx> wrote:

> Hello,
>
> I have loaded organisationunits directly into an empty database  (and in
> the process removed the uniqueness constraints for name and shortname, which
> we should do also in trunk, as discussed before).
> I did also populate the source table (did not remove the foreign key).
>
> However, when I try to do a metadata export, all I get is an empty DXF
> file. You can try it yourself here: http://97.107.142.53:8080/repo/
>

It looks like the problem I encountered with blank organisationunit metadata
exports above was linked to my removing the uniqueness constraints for
shortname. There have previously been strong arguments for removing this
constraint (by Bob and Jason, if I recall correctly). it seems that would
also entail changes to the metadata export. It is linked to the lack of
distinction between a name, an identifier and a primary key in the current
implementation.

I am encountering these problems while in the process of importing thousands
of orgunits, most lately close to 7000 from
http://kenyahealthfacilities.net/
In this case, the names are in fact unique, and all that was required was to
increase the shortname database field from 25 characters to the same as the
name (230 - the longest name was actually 63 characters in this particular
situation).

This debate has come up before, but not resolved (no action taken):
https://bugs.launchpad.net/dhis2/+bug/370791

The current situation (unique name and shortname, with shortname restricted
to 25) is untenable, making importing orgunits a painful proposition

Knut