OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



DB Error upgrading from OJS 2.3.7.0 to OJS 2.4.2.0

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
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

DB Error upgrading from OJS 2.3.7.0 to OJS 2.4.2.0

Postby mcyzyk » Wed Jul 31, 2013 8:21 am

I've just now successfully upgraded my codebase from OJS 2.3.7.0 to OJS 2.4.2.0, but am getting the following error when preforming the second half of the upgrade process, upgrading the database:

$ sudo php tools/upgrade.php check
Code version: 2.4.2.0
Database version: 2.3.7.0
Latest version: 2.4.2.0
Database version is older than code version
Run "tools/upgrade.php upgrade" to update
$ sudo php tools/upgrade.php upgrade
.
.
.
ERROR: Upgrade failed: DB: Duplicate entry '1-old_log_id' for key 'event_log_settings_pkey'
$


Not sure what to do!

In reading the other posts related to failed upgrades, it's looking like the advice is to rollback the DB and try again? And yet, wouldn't I just get the same error?

Advice appreciated!

(Also, I'm not able to use the PHP "patch" tool to upgrade OMP from 1.0 beta to 1.0.0.0 -- but that's an entirely 'nother story...)

Best regards,

Mark Cyzyk
Johns Hopkins University
mcyzyk
 
Posts: 36
Joined: Fri Aug 15, 2008 12:39 pm

Re: DB Error upgrading from OJS 2.3.7.0 to OJS 2.4.2.0

Postby asmecher » Wed Jul 31, 2013 10:52 am

Hi Mark,

The advice to roll back your DB is useful when you're trying to run a DB upgrade on a database that's already failed for some other reason. A failed DB upgrade will leave your DB stranded somewhere between the two versions, so rolling back before you try again is always a good idea.

It sounds to me like the event_log_settings table already exists and contains content, which shouldn't be true of an OJS 2.3.7 database. Can you check your OJS 2.3.7 database dump to see whether that table exists?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8421
Joined: Wed Aug 10, 2005 12:56 pm

Re: DB Error upgrading from OJS 2.3.7.0 to OJS 2.4.2.0

Postby mcyzyk » Wed Jul 31, 2013 11:29 am

Nice. Thanks, Alec!

I determined that that table was not in my MySQL dump, so I dropped it from the DB, re-ran the upgrade script (and went back and forth with this process a couple times because it was crashing due to PHP resources limits which I then Upped), and viola! All Upgraded!

Now, something disturbing I am noticing: My tables are a mix of MyISAM and InnoDB. Is that OK???

Mark
mcyzyk
 
Posts: 36
Joined: Fri Aug 15, 2008 12:39 pm

Re: DB Error upgrading from OJS 2.3.7.0 to OJS 2.4.2.0

Postby asmecher » Wed Jul 31, 2013 11:47 am

Hi Mark,

Hmm, that's a couple levels below OJS -- but perhaps your default storage engine changed e.g. as a result of a MySQL upgrade. OJS ought not to care, but there may be performance implications.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8421
Joined: Wed Aug 10, 2005 12:56 pm

Re: DB Error upgrading from OJS 2.3.7.0 to OJS 2.4.2.0

Postby mcyzyk » Wed Jul 31, 2013 1:10 pm

Thanks, Alec,

One last question related to this thread: Is there, from the OJS perspective, a preference in table type, MyISAM or InnoDB? I am not averse to changing table types so they are all the same. I'm reading that MyISAM is better for full text indexing, yet is easily corrupted; InnoDB is better for transaction processing. Which one is best for OJS as a whole?

Mark
mcyzyk
 
Posts: 36
Joined: Fri Aug 15, 2008 12:39 pm

Re: DB Error upgrading from OJS 2.3.7.0 to OJS 2.4.2.0

Postby asmecher » Wed Jul 31, 2013 3:54 pm

Hi Mark,

We target both MySQL and PostgreSQL (and may target others), so we're not making use of any particularly advanced database functionality. Both will work just fine. As of MySQL 5.5, InnoDB is the default engine; probably best to stick with that for sheer simplicity's sake.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8421
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 7 guests