DB Error: Table 'xxx_ojs3.articles' doesn't exist

Hi all
Currently I’m using OJS 2.4.8 and I want to upgrade it to OJS 3.1. I did all steps that mentioned at this article https://pkp.sfu.ca/ojs/UPGRADE, But each time that I try to upgrade database, I got this error: “DB Error: Table ‘xxx_ojs3.articles’ doesn’t exist”!!!
Before starting upgrade process, the article table is exist in the database!

Could you help me to solve this issue?

Regards
Amir

Hi Amir

Are you running upgrade process in a Terminal? Each time you attempt upgrade are you restoring a backup of your DB ?

Regards,
Israel Cefrin
Public Knowledge Project Team

Hi Israel
No, I ran it into my browser.
Yes at each time I restore my db.

Regards
Amir

Hi @Amir_Darejeh

Would you happen to upgrade with CLI tool? E.g.: php tools/upgrade.php upgrade

Regards,
Israel Cefrin
Public Knowledge Project Team

Hi Israel
Unfortunately I can’t access CLI tool. Do have any other solution?

Regards
Amir

Hi @Amir_Darejeh

Would you happen to perform a local install/upgrade then upload a updated database (dump > restore) ?

Regards,
Israel Cefrin
Public Knowledge Project Team

Hi @israel.cefrin
I did what you said, but in localhost still I got the same error!!
Do you have any other idea?

Regards
Amir

Hi @Amir_Darejeh

Are you using original dump (before any upgrade attempt) ? Could you review this dump to double check that "create table articles" exists?

Regards,
Israel Cefrin
Public Knowledge Project Team

I’m having the same problem, what can be done to continue with the upgrade?

Thank you,

Julio Barreto

i got the same problem could any body please provide solution
[pre-install]
[load: upgrade.xml]
[version: 3.1.1.4]

[code: Installer Installer::checkPhpVersion]

[code: Installer Installer::syncSeriesAssocType]
[data: dbscripts/xml/upgrade/2.4.0_preupdate_usageStatistics.xml (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_preupdate_usageStatistics2.xml (skipped)]

[code: Installer Installer::removeReviewEntries]

DB Error: Table 'ojsxx.articles' doesn't exist

Stack Trace:

File: /home/lifescie/public_html/pms/classes/install/Upgrade.inc.php line 78
Function: DAO->retrieve("SELECT article_id, journal_id, review_file_id FROM articles WHER...")

File: (unknown) line (unknown)
Function: Upgrade->removeReviewEntries(Object(Upgrade), Array(1))

File: /home/lifescie/public_html/pms/lib/pkp/classes/install/Installer.inc.php line 421
Function: call_user_func(Array(2), Object(Upgrade), Array(1))

File: /home/lifescie/public_html/pms/lib/pkp/classes/install/Installer.inc.php line 265
Function: Installer->executeAction(Array(3))

File: /home/lifescie/public_html/pms/lib/pkp/classes/install/Installer.inc.php line 186
Function: Installer->executeInstaller()

File: /home/lifescie/public_html/pms/lib/pkp/classes/cliTool/UpgradeTool.inc.php line 88
Function: Installer->execute()

File: /home/lifescie/public_html/pms/lib/pkp/classes/cliTool/UpgradeTool.inc.php line 64
Function: UpgradeTool->upgrade()

File: /home/lifescie/public_html/pms/tools/upgrade.php line 34
Function: UpgradeTool->execute()

it is the error i got when i run php tools/upgrade.php upgrade through cli kindly let me out of out of this i am completely stuck with it

Hi @abbas_ilab

From what OJS version you are updating?
Can you check on your original database if articles table exists? By the term ‘original database’ I mean the one before the update.

yes before updating the table was there

iam updating from ojs version 2.4.2.0

the code version get update but the database version still remain the same
Code version: 3.1.1.4
Database version: 2.4.2.0
Latest version: 3.1.1.4

I recommend to make first an upgrade on local machine through command line. As I know, the best approach is to upgrade to the latest 2.4.8 release (2.4.8-3) and after success upgrade to the latest OJS 3. Don’t forget to make an update on the intact database, which wasn’t exposed to it earlier.

Thank you very much i’ll try this way

Hi @Vitaliy, I tried this way but it does not working

Code version: 3.1.2.0
Database version: 2.4.8.4
Latest version: 3.1.2.0
Database version is older than code version
Run “tools/upgrade.php upgrade” to update

php tools/upgrade.php upgrade

ERROR: Upgrade failed: DB: Table ‘articles_migration’ already exists

Hi @alejopachons

Hmm, most probably this error means that the update process was already performed before and it wasn’t successful as the database version is still 2.4.8.
Can you restore the database from a backup and perform the update process once again?
The best way is to try first on the local OJS instance.

I struggled with this error for some time.

In my case the solution was, prior to any attempt to upgrade, look at the 2.4.8 dbase articles table:

click on section.id to see if there are any NULL entries. Assign all null entries with a valid section.id number

run the upgrade through cli

Hi there @abbas_ilab!

I’m also experiencing the same problem upgrading from 2.4.2 to 3.1.2-1 . Had you succeed upgrading from 2.4.8 to to 3.x?