This is a revolved problem, but reporting anyway
script upgrade.php fails because of missing tables in database
php tools/upgrade.php upgrade
The problem was attack in:
https://www.fenf.edu.uy/bugs/show_bug.cgi?id=5554
I upgraded an old server that had already been upgraded previously and previously and previously from version back from 2.4.6.0 [2015-03-30] to 3.0.2.0 [2017-09-20] to 3.1.2.1 [2019-07-16], so the database (apparently) wasn’t in a very friendly state. But anyway the system works!
The upgrade script (upgrade.php) expected to find the database in a state that was obviously not as expected, with missing tables that prevented the script from performing the upgrade.
I did a fresh install to see all the tables the Database should have
And I ran the script and for each missing table I copied the table from the fresh install until the script finished.
The missing tables are in this SQL file:
https://www.fenf.edu.uy/bugs/attachment.cgi?id=132
I don’t know if NOW the script is fixed. But you shouldn’t assume that the database has all the tables; you should first install all new (and missing) tables before migrating any data
PD: For certain details on how my ojs behaves I can assure that the database is still “sick” (but it works!)