Upgrade OJS 3.3.0-3 errors

I attempted to update the www.ncl.ecu.edu site to OJS 3.3.0-3. The site started at OJS 2.4.8-5 and was successfully upgraded to OJS 3.2.1-4.

I tried following the suggestions ojs-tools/fix-database-encoding.md at master · kaitlinnewson/ojs-tools · GitHub and Merge pull request #6744 from Vitaliy-1/i6743_review_files · pkp/pkp-lib@6dd9e2a · GitHub without success.

[pre-install]
[load: upgrade.xml]
[version: 3.3.0.3]

[code: Installer Installer::checkPhpVersion]

[code: Installer Installer::installDefaultNavigationMenus]
WARNING: The NavigationMenu (ContextId: 1, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.
WARNING: The NavigationMenu (ContextId: 1, Title: Primary Navigation Menu, Area: primary) will be skipped because the specified area has already a NavigationMenu attached.
WARNING: The NavigationMenu (ContextId: 0, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.

[code: Installer Installer::migrateStaticPagesToNavigationMenuItems]
[migration: PKPv3_3_0UpgradeMigration]
ERROR: Upgrade failed: DB: SQLSTATE[HY000]: General error: 1005 Can’t create table NCL.#sql-4d6_2a07 (errno: 150 “Foreign key constraint is incorrectly formed”) (SQL: alter table review_round_files add constraint review_round_files_submission_file_id_foreign foreign key (submission_file_id) references submission_files (submission_file_id))

Hi @criminal,

Take a look at this thread: Serious issue with Database upgrade (failed from 3.2.1.3 to 3.3.0.2) - #8 by Carlo_Manuali and this issue: Upgrade to 3.3: default database engine doesn't support foreign key constraint · Issue #6732 · pkp/pkp-lib · GitHub

I’ve got the same ERROR by migrating OJS 3.2.1-4 to OJS 3.3.0-3.

Thank you. That fixed the upgrade error. I had to

  1. Run the query ALTER TABLE submission_files ENGINE = InnoDB;
  2. Changing the MySQL server engine to InnoDB.
  3. Changing the database character set to utf8_general

@asmecher Are you integrating this to OJS automatic upgrade process then? This is not yet documented in the upgrade manual. Im facing the same here: ERROR: Upgrade failed: DB: SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint (SQL: alter table review_round_filesadd constraintreview_round_files_submission_file_id_foreign foreign key (submission_file_id) references submission_files (submission_file_id)) with 3.3.0-3. Or is this a very specific issue?

Same issue while upgrading to 3.3.0.4? Is there no fix included for:

ERROR: Upgrade failed:
DB: SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint
(SQL: alter table `review_round_files` add constraint `review_round_files_submission_file_id_foreign`
foreign key (`submission_file_id`) references `submission_files` (`submission_file_id`))

?

grafik

grafik

Solved it now by manually adapt this. But this should’ve catched by the updater! @asmecher