Upgrade never happened - maybe

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.
Posts: 19
Joined: Sun Aug 12, 2012 9:43 pm

Upgrade never happened - maybe

Postby keir » Sun Aug 12, 2012 10:10 pm

I have an OJS installation version
Its been having a number of problems that should have been cured in this version.
I notice in the site-administrator->system information that it reports it is still version
I made sure that the php installation was and it is the full packge.
I tried running tools/upgrade.php to make sure the database is right. This should have been done at
previous upgrade but perhaps this step was not checked through properly.

The upgrade script gives an error message perhaps because it has already
been done. i am not sure.

There is a previous post with a similar error but if they seemed to have a mystical knowledge of
multiple postgres commands that need to be applied. How do you determine the postgres commands
that it is trying to apply? Is it correct to bodgy the dtabase. Hopefully this version of OJS has this problem sorted?

Okay when I run
php tools/upgrade.php upgrades

[load: upgrade.xml]
[data: dbscripts/xml/upgrade/public_issue_ids.xml]
[data: dbscripts/xml/upgrade/2.2.0_preupdate.xml]
ERROR: Upgrade failed: DB: ERROR: column "currency_code_alpha" of relation "subscription_types" already exists

Any suggestions?

Posts: 19
Joined: Sun Aug 12, 2012 9:43 pm

Re: Upgrade never happened - maybe

Postby keir » Tue Aug 14, 2012 4:07 pm

Upgrade did happen.
The upgrade executes SQL commands found in a set of XML files in
I can trace through the alter etc and find the commands have previously been executed.

The question then is why is the System Information showing a previous version is installed?

Does anyone know where this information is kept or why this might be happening?

Site Admin
Posts: 910
Joined: Tue Jan 10, 2006 6:20 am

Re: Upgrade never happened - maybe

Postby JasonNugent » Wed Aug 15, 2012 2:49 am

Hi Keir,

It looks like some of your upgrade happened, but perhaps not all of it. When it first ran, there must have been some condition that occurred that prevented the final post-install SQL statements from running. At the very end of an upgrade, the 'versions' table gets upgraded to indicate that a new version of OJS has been installed. That is where the system gets the current version information from.

Do you have a pre-upgrade version of your database? Any chance of running it again from the beginning on an unaltered version? There are quite likely some commands that have not had a chance to run, so you may find unexpected behaviour when using your new version.


Posts: 19
Joined: Sun Aug 12, 2012 9:43 pm

Re: Upgrade never happened - maybe

Postby keir » Mon Aug 20, 2012 8:57 pm

The trouble is that the upgrade was done some time ago by someone else and since then users have been happily entering publication material.
Yes you are right there is strange behaviour going on.
Looks like I will have to trawl through each SQL command and try to devine where it failed and manually complete the upgrade.
What we need though is a database check script that confirms what is is right or wrong at least with the schema of a database.

Return to “OJS Technical Support”

Who is online

Users browsing this forum: Baidu [Spider] and 2 guests