Failed update ojs 2.4.8-5 to 3.2.1-4 | Duplicate entry '14696-3-1' for key 'review_rounds_submission_id_stage_id_round_pkey'

I have a problem when upgrading the ojs version 2.4.8-5 to 3.2.1-4, this is the problem;


I start the upgrade again with the new database from my backup.
and solve the problem by using this query :
CREATE TABLE review_rounds_old SELECT * FROM review_rounds;

DELETE FROM review_rounds WHERE review_round_id NOT IN (SELECT MIN(review_round_id) FROM review_rounds_old GROUP BY submission_id, round);

DROP TABLE review_rounds_old;

but I got a new error like this;

this is like data duplication which is not allowed in the new version, when I upgraded from an older version to 2.4.8-5 it was fine, but when I upgraded to version 3.2.1-4 I encountered the above problem. I also had the same problem when upgrading to the 3.0.0 version.

I have the same problem. Is there any sql query to handle the problem before running the upgrade?

Check error #05 in this list:

Cheers,
m.

1 Like