Issue with Duplicate Entries During OJS 3.4.0.7 Upgrade - Recurring Table Entries

Hello everyone,

I am facing an issue while trying to upgrade Open Journal Systems (OJS) to version 3.4.0.7. The upgrade process fails repeatedly due to duplicate entries in several tables such as scheduled_tasks, review_files, and review_form_responses. Despite manually deleting these duplicate entries using SQL commands, they reappear when I re-run the upgrade process, causing the upgrade to fail again with integrity constraint violations or syntax errors.

Here are some of the errors I encounter:

  • SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ... for key 'scheduled_tasks_unique'
  • SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'review_files_unique'

I have tried manually deleting the duplicate records from the scheduled_tasks table and other affected tables, but they are recreated when the upgrade runs again. It seems like the upgrade scripts are recreating these entries, preventing me from completing the upgrade process.

Has anyone encountered a similar issue?

  • What is the best way to permanently resolve these duplicate key problems during the upgrade?
  • Is there a way to skip or modify these migrations safely to allow the upgrade to continue?
  • Are there specific upgrade scripts or migration files I can modify to bypass these duplicate entry checks?

I would appreciate any help or suggestions to resolve this issue, as this upgrade is crucial and I’m unable to proceed.

Thank you!