Content
You are here:
Issues with duplicate key value violations
Added by Rick Green almost 4 years ago
Ever since migrating to version 11, I have been having errors with duplicate key value violations. I am at the current version (11.04, and I did run the openproject configure after the upgrade). The latest key violation happened when attempting to create a new project. The log entry is shown here:
A search through the database for this index name returns the following:
Indeed, index 578 exists, and it is for the "budgets" of project_id is 28. There are many indexes above 578, as well.
What can be done to correct these indexing issues? Is there a procedure to reset the indexing?
Replies (4)
I just upgraded to the latest 11.1 and reran openproject configure. Still having the same problem.
Just upgraded to 11.1.1, and still have this issue. This error shows up every time I attempt to create a new project. On the OpenProject site, I get an error 500. I am unable to add new projects as a result.
OK, so I went through the schema on the github page again to see how it was set up. The problem seems to be in the public.enabled_modules_id_seq sequence. The highest index was 694, so I issued a restart of the sequence to 700 and this corrected the problem.
The syntax of the postgresql code is:
Hi Rick, it's great that you found a fix for this! Thank you for sharing your process!