Describe the issue or problem
Hi everyone,
I am seeking urgent help regarding a failed upgrade of my OJS instance from version 3.4.0.8 to 3.5.0.3.
I initially attempted this upgrade back in December 2025, but it failed midway. Since then, my installation has been stuck in a “half-upgraded” state. Every time I try to run the upgrade script now, I encounter a series of conflicting database errors. When I resolve one, the next one appears, often pointing back to the same tables.
The specific errors I am rotating between are:
-
Missing Column in
siteTable:SQLSTATE[42S22]: Column not found: 1054 Unknown column 'redirect' in 'site' (SQL: alter table site modify redirect bigint null) -
Duplicate Column in
siteTable:SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'redirect_context_id' (SQL: alter table site rename column redirect to redirect_context_id) -
Missing Column in
notification_subscription_settings:SQLSTATE[42S22]: Column not found: 1054 Unknown column 'context' in 'notification_subscription_settings' (SQL: alter table notification_subscription_settings rename column context to context_id)
Subject: Stuck in Upgrade Loop (OJS 3.4.0.8 to 3.5.0.3): Persistent Database Errors with ‘site’ and ‘notification_subscription_settings’ tables
Post Body:
Hi everyone,
I am seeking urgent help regarding a failed upgrade of my OJS instance from version 3.4.0.8 to 3.5.0.3.
I initially attempted this upgrade back in December 2025, but it failed midway. Since then, my installation has been stuck in a “half-upgraded” state. Every time I try to run the upgrade script now, I encounter a series of conflicting database errors. When I resolve one, the next one appears, often pointing back to the same tables.
The specific errors I am rotating between are:
-
Missing Column in
siteTable:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'redirect' in 'site' (SQL: alter table site modify redirect bigint null) -
Duplicate Column in
siteTable:
SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'redirect_context_id' (SQL: alter table site rename column redirect to redirect_context_id) -
Missing Column in
notification_subscription_settings:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'context' in 'notification_subscription_settings' (SQL: alter table notification_subscription_settings rename column context to context_id)
The Dilemma:
It seems the upgrade script expects the old schema (e.g., the redirect column) to exist so it can rename or modify it. However, because of the previous failed attempts, the database structure is inconsistent. I have tried manually adding/dropping these columns via phpMyAdmin to satisfy the script, but it leads to further errors (like Duplicate key on foreign keys in the filters table).
Unfortunately, I do not have a clean SQL backup from before the December attempt. I am trying to fix the current database state manually to allow the 3.5.0.3 files to complete the migration.
Questions:
-
Is there a specific SQL sequence to “reset” the
siteandnotification_subscription_settingstables to a state that the 3.5.0.x migration script can recognize? -
How can I bypass these column-level conflicts without breaking the data integrity for my journals
Any advice on how to get out of this loop would be greatly appreciated. Thank you!