OJS Upgrade from 3.4.0-9 to 3.5.0-0 Fails - Unknown Column 'redirect' in 'site' Table

OJS 3.4.0-9 → 3.5.0-0 Upgrade Critical Database Failures on MariaDB 11.4

System Environment:

  • Current OJS Version: 3.4.0-9 (stable, restored from backup)
  • Target Upgrade Version: 3.5.0-0
  • PHP Version: 8.3.14 (or specific version)
  • Database: MariaDB 11.4.x
  • Operating System: AlmaLinux/RHEL-based
  • Installation Type: Production academic journals (multi-journal setup)
  • Current Status: :white_check_mark: System operational after backup restoration

Issue Summary:

Attempted upgrade from OJS 3.4.0-9 to 3.5.0-0 resulted in critical database corruption. Multiple migration failures created cascading schema corruption requiring complete backup restoration. System is now stable but upgrade path is blocked.


Critical Migration Failures Documented:

Error 1: MariaDB SQL Syntax Incompatibility

ERROR: Upgrade failed: DB: SQLSTATE[42000]: Syntax error or access violation: 1064 
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB 
server version for the right syntax to use near '''' at line 1 
(Connection: mysql, SQL: alter table `email_templates_default_data` modify `locale` 
varchar(28) not null default ''en'')

Analysis: MariaDB 11.4 strict SQL mode rejects malformed default value syntax

Error 2: Column Rename Conflicts

ERROR: Upgrade failed: DB: SQLSTATE[42S21]: Column already exists: 1060 
Duplicate column name 'redirect_context_id' 
(Connection: mysql, SQL: alter table `site` rename column `redirect` to `redirect_context_id`)

Analysis: Migration attempted to rename column that was already renamed in previous failed attempt

Error 3: Missing Column Dependencies

ERROR: Upgrade failed: DB: SQLSTATE[42S22]: Column not found: 1054 
Unknown column 'context' in 'notification_subscription_settings' 
(Connection: mysql, SQL: alter table `notification_subscription_settings` rename column `context` to `context_id`)

Analysis: Expected database schema structure doesn’t match OJS 3.4.0-9 baseline

Error 4: Schema Inconsistency

ERROR: Upgrade failed: DB: SQLSTATE[42S22]: Column not found: 1054 
Unknown column 'redirect' in 'site' 
(Connection: mysql, SQL: alter table `site` modify `redirect` bigint null)

Analysis: Partial migration left database in inconsistent state


Migration Failure Pattern:

[migration: PKP\migration\upgrade\v3_5_0\PreflightCheckMigration] ← Consistently fails here
[migration: APP\migration\upgrade\v3_5_0\I8333_AddMissingForeignKeys]
[revert migration: PKP\migration\upgrade\v3_5_0\PreflightCheckMigration]
[An upgrade step failed! Fallback set to 3.4.9.9] ← Artificial version, not real rollback

Corruption Cascade: Each failed retry attempt created additional schema corruption, requiring multiple backup restorations to achieve stable state.


Fresh start with new 3.4.0.9 clean instillation got same errors:

[root@node-0 ]# php tools/upgrade.php check
Code version: 3.5.0.0
Database version: 3.4.0.9
Latest version: 3.5.0.0
Database version is older than code version
Run “tools/upgrade.php upgrade” to update
[root@
]# php tools/upgrade.php upgrade
2025-07-02 23:20:12 [pre-install]
2025-07-02 23:20:12 [load: upgrade.xml]
2025-07-02 23:20:12 [version: 3.5.0.0]
2025-07-02 23:20:12 [code: Installer Installer::checkPhpVersion]
2025-07-02 23:20:12 [code: Installer Installer::installDefaultNavigationMenus]
2025-07-02 23:20:12 [code: Installer Installer::migrateStaticPagesToNavigationMenuItems]
2025-07-02 23:20:12 [migration: APP\migration\upgrade\v3_4_0\I9813_QuickSubmitSubmissionProgressType]
2025-07-02 23:20:12 [migration: APP\migration\upgrade\v3_5_0\I11241_MissingDecisionConstantsUpdate]
2025-07-02 23:20:12 [migration: PKP\migration\upgrade\v3_5_0\PreflightCheckMigration]
2025-07-02 23:20:12 [migration: APP\migration\upgrade\v3_5_0\I8333_AddMissingForeignKeys]
2025-07-02 23:20:12 [migration: APP\migration\upgrade\v3_5_0\I9892_FloatToDecimalColumnTypeUpdate]
2025-07-02 23:20:12 [migration: PKP\migration\upgrade\v3_5_0\I9895_AddAppKeyToConfigFile]
2025-07-02 23:20:12 [migration: PKP\migration\upgrade\v3_5_0\I9678_RemoveScheduledTasksTable]
2025-07-02 23:20:12 [migration: PKP\migration\upgrade\v3_5_0\InstallEmailTemplates]
2025-07-02 23:20:12 [migration: PKP\migration\upgrade\v3_5_0\I9197_MigrateAccessKeys]
2025-07-02 23:20:12 [migration: PKP\migration\upgrade\v3_5_0\I9253_SiteAnnouncements]
2025-07-02 23:20:12 [migration: PKP\migration\upgrade\v3_5_0\I9262_Highlights]
2025-07-02 23:20:12 [migration: APP\migration\upgrade\v3_5_0\I9475_RecoverLayoutFiles]
2025-07-02 23:20:12 [migration: PKP\migration\upgrade\v3_5_0\I9462_UserUserGroupsStartEndDate]
2025-07-02 23:20:12 [migration: PKP\migration\upgrade\v3_5_0\I9552_UserGroupsMasthead]
2025-07-02 23:20:12 [migration: PKP\migration\upgrade\v3_5_0\I5504_UserGroupsSettings]
2025-07-02 23:20:12 [migration: APP\migration\upgrade\v3_5_0\I9425_SeparateUIAndSubmissionLocales]
2025-07-02 23:20:12 [revert migration: PKP\migration\upgrade\v3_5_0\I5504_UserGroupsSettings]
2025-07-02 23:20:12 [revert migration: PKP\migration\upgrade\v3_5_0\I9552_UserGroupsMasthead]
2025-07-02 23:20:12 [revert migration: PKP\migration\upgrade\v3_5_0\I9462_UserUserGroupsStartEndDate]
2025-07-02 23:20:12 [revert migration: APP\migration\upgrade\v3_5_0\I9475_RecoverLayoutFiles]
2025-07-02 23:20:12 [downgrade for “APP\migration\upgrade\v3_5_0\I9475_RecoverLayoutFiles” unsupported: Downgrade not supported]
ERROR: Upgrade failed: DB: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manualthat corresponds to your MariaDB server version for the right syntax to use near ‘’‘’ at line 1 (Connection: mysql, SQL: alter table email_templates_default_data modify locale varchar(28) not null default ‘‘en’’)
[root@
*****]#

Hi @Raqeeb_Al-Naqeeb,

See: Upgrade error 3.4 to3.5

Regards,
Alec Smecher
Public Knowledge Project Team

I Did Many Times, Getting Same Error.
Can I Know When 3.5.0.1 Be Released Please?

Hi @Raqeeb_Al-Naqeeb,

We’re hoping within the next two weeks, but it’ll depend on how soon we can wrap up the most high-priority issues.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Thank you very much for the update and for your continued support.

We’re looking forward to the release of 3.5.0-1, especially as the current upgrade path from 3.4.0-9 to 3.5.0-0 is unfortunately blocked for us.

Given the critical nature of this upgrade for production environments, especially those running multi-journal setups like ours, your efforts to resolve these issues are truly appreciated.

We’ll keep a close eye out for the release and are ready to test the update as soon as it’s available.

Warm regards,

Raqeeb Al-Naqeeb

1 Like

This topic was automatically closed after 11 days. New replies are no longer allowed.