← Back to team overview

dhis2-devs team mailing list archive

Re: Conflicts merging databases

 

I suspect, but at not 100% sure this may because of the dodgy workaround
some people (including yours truly) have used to get around the restriction
of the same category option in different categories.

"Male"  and "Male " which appear in two different categories will be
accepted by DHIS2, but during metadata export, I think the "Male " will be
trimmed to "Male", and when this is imported into the target system, this
error will occur.

I have not 100% confirmed that this is the case, but I have seen similar
errors when exporting DXF and attempting to import it into a cloned
database.

Regards,
Jason


On Fri, Aug 19, 2011 at 1:40 PM, Knut Staring <knutst@xxxxxxxxx> wrote:

> Hi guys,
>
> I have a DHIS db (uin MySQL) into which a lot of data have been manually
> imported from a different system.
>
> Now I want to move (parts of) these data into my repository, but when
> importing the DXF export, I get a PSQLException like this: ERROR: duplicate
> key value violates unique constraint "dataelementcategoryoption_name_key"
> Detail: Key (name) = (Male) already exists.
>
> Basically, the dataelements in the old HMIS do not (yet) exist in the
> repository. I hoped they (and the datasets they belong to) would just be
> added, and then the data imported.
>
> Any good tips on how to handle this situation? Should I do a metadata
> export/import first? Will that help? Do I have to rename the option in the
> source HMIS db before exporting?
>
> Knut
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References