Upgrade database from OJS 2.4.2.0 to OJS 3.0.1

I am trying to update my odl OJS 2.4.x version to 3.0.1. I got this following error.

    [pre-install]
    [load: upgrade.xml]
    [version: 3.0.1.0]
[code: Installer Installer::syncSeriesAssocType]
[data: dbscripts/xml/upgrade/2.4.0_preupdate_usageStatistics.xml]
[data: dbscripts/xml/upgrade/2.4.0_preupdate_usageStatistics2.xml]
[data: dbscripts/xml/upgrade/3.0.0_preupdate.xml]
[data: dbscripts/xml/upgrade/3.0.0_adaptTimedViews.xml]
[data: dbscripts/xml/upgrade/3.0.0_adaptReferrals.xml]
[data: dbscripts/xml/upgrade/3.0.0_adaptBooksForReview.xml]
[data: dbscripts/xml/upgrade/remove_timed_views_bots.xml]
[code: Installer Installer::migrateCounterPluginUsageStatistics]
<h1>DB Error: Table 'jnhrc_server_old.metrics' doesn't exist</h1>ojs2: DB Error: Table 'jnhrc_server_old.metrics' doesn't exist

I tried the solution of this link link which is for OJS 3.0.2(mine is OJS3.0.1) but same error is still showing up. How can I fix this issue?

Is there any reason you have selected OJS 3.0.1 instead of 3.0.2? The revision number change may be small, but the improvements between 3.0.1 and 3.0.2 are significant.

Two ways for you to approach this would be:

  • Upgrade to 2.4.3 (or later) first, then to 3.x
  • Upgrade to 3.0.2 from GitHub (the ojs-stable-3_0_2 branch has the needed fix, but the packaged .zip will not).
1 Like

@ctgraham I got this project recently and it was already built using 3.0.1. There is the problem of not opening PDF and DOCX file. I am trying to solve this issue so thought to upgrade the old database to the new one. I will upgrade it to OJS stable 3_0_2 as you said.

Also, I want to know how OJS saves files in database and filesystem? If there is a file in “journals/1/articles/146/submission/proof/146-1-143-1-10-20130822.pdf” and “journals/1/articles/146/submission/proof/146-1-143-1-PB.pdf” then, how it is saved in database? How OJS access the file? Thank you.

In OJS 3.x, the files are indexed in the database in the submissions_file table. Note that this changed substantially between 2.4.x and 3.x.

The class SubmissionFile represents these files from a code perspective, with DAO access via SubmissionFileDAODelegate.

SubmissionFile::_getFileName() is the method to look at in terms of mapping SubmissionFile attributes to the filename on disk:

@ctgraham Thank you for your time. I upgraded it to OJS3.0.2 and it’s working fine.