dhis2-users team mailing list archive
-
dhis2-users team
-
Mailing list archive
-
Message #02165
Re: Adding New Indicators results in Duplicate value in PKey Violation Error
Hi Busoye
You can change the current value of hibernate sequence by open your
postgresql database> there you expand the Schemas >
expand the Sequences> right click on Hibernate_sequence and select
Properties. the Current Value is in the Definition tab.
Change this number to the highest id from your indicator table or highest
in all the id value you have in the database to prevent this error happen
again in future.
Thuy
On Thu, Apr 25, 2013 at 3:38 AM, Busoye Anifalaje <busoye@xxxxxxxx> wrote:
> Hi all,
>
> I imported 190 new indicators through a csv import into Postgres.
> IndicatorID as the primary key was set incrementally to continue from the
> last highest number (i.e. 33466, 33467, 33468 ... 33673). The imported
> indicators work perfectly.
>
> Now the problem: I tried to create a new indicator through the front end
> in DHIS2.11 (Build Revision: 10492) but keep getting an error that
> identifies a primary key conflict with the indicatorid. I also found that
> with every retry, the system tries to use the next incremental indicatorid
> (e.g. trial 1: indicatorid 33467 already exists; trial 2: 33468 already
> exists). I manually entered the indicator directly into the postgres table
> without any problem. Again, the indicator works fine. Any ideas on how to
> solve this problem without having to update all the imported indicators
> with new indicator ids?
>
> Further details of the error are attached in the attached screenshots (for
> some reason my tomcat log is not capturing the error - also attached).
>
> Thanks.
>
> Busoye
>
> DHIS Version: 2.11
> Build Revision: 10492
> OS: Windows XP
> OS Version: 5.1
>
>
>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help : https://help.launchpad.net/ListHelp
>
>
Follow ups
References