Issue upgrading from 3.1.2.4 to 3.3.0.11

Describe the issue or problem
I’m running into an issue when upgrading my OJS 3.1.2.4 to 3.3.0.11

Steps I took leading up to the issue

  • I made a good backup of DB version 3.1.2.4
  • Downloaded and extracted ojs-3.3.0-13.tar.gz
  • Modified the config.inc.php file
  • Ran php tools/upgrade.php upgrade
  • Got the error messages:

2022-10-26 14:23:22 [code: Installer Installer::migrateSiteStylesheet]
2022-10-26 14:23:22 [code: Installer Installer::migrateMetadataSettings]
2022-10-26 14:23:22 [code: Installer Installer::createLicenseTerms]
2022-10-26 14:23:22 [code: Installer Installer::installEmailTemplate]
2022-10-26 14:23:22 [code: Installer Installer::changeUserRolesAndStageAssignmentsForStagePermitSubmissionEdit]
2022-10-26 14:23:22 [data: dbscripts/xml/upgrade/3.2.0_versioning.xml]
ERROR: Upgrade failed: DB: SQLSTATE[21000]: Cardinality violation: 1242 Subquery returns more than 1 row (SQL:
UPDATE submissions as s
SET current_publication_id = (
SELECT p.publication_id
FROM publications as p
WHERE s.submission_id = p.submission_id
)
)

What application are you using?
I’m running OJS 3.1.2.4

Additional information

  • I’m not running from a failed upgrade DB.
  • My DB has publications table shows the:

±-------------------±------------±-----±----±--------±---------------+
| Field | Type | Null | Key | Default | Extra |
±-------------------±------------±-----±----±--------±---------------+
| publication_id | bigint(20) | NO | PRI | NULL | auto_increment |
| access_status | bigint(20) | YES | | 0 | |
| date_published | date | YES | | NULL | |
| last_modified | datetime | YES | | NULL | |
| locale | varchar(14) | YES | | NULL | |
| primary_contact_id | bigint(20) | YES | | NULL | |
| section_id | bigint(20) | YES | MUL | NULL | |
| seq | double | NO | | 0 | |
| submission_id | bigint(20) | NO | MUL | NULL | |
| status | tinyint(4) | NO | | 1 | |
| url_path | varchar(64) | YES | MUL | NULL | |
| version | bigint(20) | YES | | NULL | |
±-------------------±------------±-----±----±--------±---------------+
12 rows in set (0.001 sec)

Kindly suggest,

Hi @Ptran

If you are starting with 3.1.2-4 your database should not have a publications table. That was introduced in OJS 3.2.

Best
Jason