Database Schema Error: Unknown column 'et.email_id' in SELECT during upgrade from 3.1.1-4 to 3.3.0-23

What happens:
I am trying to restore and upgrade our institutional OJS instance. The website currently shows a blank screen or a “500 Internal Server Error” on all individual journal pathways (e.g., /bij, /kaib1, /jmis). The cPanel error_log reveals a fatal exception: Table 'borneojo_ojs19.navigation_menu_items' doesn't exist [1.14].

When attempting to fix this by executing the official command-line upgrade utility (php tools/upgrade.php upgrade), the script becomes completely deadlocked during the migration phase [1.14]. It throws a sequential database schema error: Unknown column 'et.email_id' in 'SELECT' [1.14]. If I try to manually add the column or manipulate the tables to satisfy this query, the script crashes on the very next loop execution with a 1060 Duplicate column name 'email_id' during the ALTER TABLE tasks inside the migration XML files [1.11, 1.14]. The system appears to be stuck in an un-upgradable, hybrid schema state [1.11, 1.14].

What I expected to happen:
I expected the command-line upgrade script to cleanly migrate our older layout structures, parse the application tables sequentially, and upgrade our database to match our target version without getting trapped in a recursive table collision block [1.5].

Steps I took leading up to the issue

  1. A hosting automated installer tool (Softaculous) initially forced a partial upgrade path that failed and crashed halfway [1.5, 1.11].

  2. The hosting provider successfully restored our pristine, uncorrupted core application backup and file repository (ojsdata) from 1 October 2026 [1.5]. The database structure belongs to OJS 3.1.1-4 [1.5].

  3. The core files in /public_html/journal were prepared for version 3.3.0-23 [1.5].

  4. Set the parameters inside config.inc.php to installed = Off [1.14].

  5. Opened the cPanel Terminal app and accessed the system directory: cd /home/borneojo/public_html/journal [1.14, 1.15].

  6. Executed the upgrade command using the stable environment path: /opt/alt/php74/usr/bin/php tools/upgrade.php upgrade [1.14].

  7. The terminal execution blocks completely, returning the Unknown column 'et.email_id' in 'SELECT' exception [1.14].

  8. What application are you using?

    • Core Application Enjin: Open Journal Systems (OJS)
    • Source Database Layout: Version 3.1.1-4 (Verified from original October 1st backup dump) [1.5]
    • Target Application Framework: Version 3.3.0-23 [1.5]
    • Server Environment Properties: Linux Shared Hosting, Apache/LiteSpeed, PHP 7.4.33, MySQL [1.14]
    • Server Terminal Log Exception Output:
    • [borneojo@india8 journal]$ /opt/alt/php74/usr/bin/php tools/upgrade.php upgrade
    • 2026-10-13 08:42:45 [pre-install]
    • 2026-10-13 08:42:45 [load: upgrade.xml]
    • 2026-10-13 08:42:45 [version: 3.3.0.23]
    • 2026-10-13 08:42:45 [code: Installer Installer::checkPhpVersion]
    • 2026-10-13 08:42:45 [data: dbscripts/xml/upgrade/3.1.2_preupdate_user_author_names.xml]
    • 2026-10-13 08:42:45 [data: dbscripts/xml/upgrade/3.2.0_preupdate_email_templates.xml]
    • ERROR: Upgrade failed: DB: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘et.email_id’ in ‘SELECT’ (SQL: UPDATE email_templates_data etd LEFT JOIN email_templates et ON (etd.email_key = et.email_key AND etd.assoc_type = et.assoc_type AND etd.assoc_id = et.assoc_id) SET etd.email_id = et.email_id)
  9. PHP Core Crash Diagnostics (error_log):slight_smile: PHP Fatal error: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘borneojo_ojs19.navigation_menu_items’ doesn’t exist in /home/borneojo/public_html/journal/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:80
    Stack trace:
    #0 PDO->prepare(‘SELECT * FROM n…’, Array)
    #1 Illuminate\Database\Connection->Illuminate\Database{closure}(Object(Illuminate\Database\Query\Expression), Array)

  10. Our historical journal records, submitted papers, and user accounts inside borneojo_ojs19 are verified secure and completely intact [1.5]. We are seeking guidance on what structural alignment script, version modification flags, or data bypass steps should be applied to let the database cross the finish line to version 3.3.0-23 safely



Hello @majmuah18 , Thank you for your post.

It looks like you have gotten stuck during the upgrade. I would not recommend trying to repair the database any further. Usually this results is creating more problems further down the line. My best advice is to restore from the original back up (before the first upgrade attempt) and run the upgrade again. Once that has been done, if there is an original root error, please report that first error message before moving on. Then check the forum for a solution as this might already be resolved already.

I can see that you have another post that might be related to this original problem. I can close that one now unless there is something specific to address? In general, it is best to keep posts specific so that the team can focus on resolving the root issue in one location rather than spread our limited resources around.