OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Error upgrading OJS database from 2.1.0-1 to 2.1.1

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.

Error upgrading OJS database from 2.1.0-1 to 2.1.1

Postby mgoay » Wed Jul 19, 2006 8:09 pm

I encountered the following error message when performing OJS database upgrade at command-line or web:

[data: upgrade/2.1.1_update.xml]
ERROR: Upgrade failed: DB: Field 'last_run' doesn't have a default value

At subsequent runs of the upgrade command, I encountered

[data: upgrade/2.1.1_update.xml]
ERROR: Upgrade failed: DB: Duplicate entry 'OPEN_ACCESS_NOTIFY' for key 2

Are these errors benign? I would appreciate any suggestions for how to correct the errors.

Many thanks,
Michael
mgoay
 
Posts: 3
Joined: Wed Jul 19, 2006 7:57 pm

Postby asmecher » Wed Jul 19, 2006 10:26 pm

Hi Michael,

What DBMS and version are you running? This may be an ADODB bug -- if the schema is being correctly updated according to the schema descriptor, you shouldn't receive the message about last_run being null. (The subsequent error occurs because the updater is trying to insert a row that has already been inserted -- you can ignore this.)

I'd suggest the following. Update OJS's versions list manually with the following:
Code: Select all
UPDATE versions SET current = 0;
INSERT INTO versions (major, minor, revision, build, date_installed, current) VALUES (2, 1, 1, 0, now(), 1);
Now try running tools/upgrade.php with the "upgrade" command to re-sync the database schema with the XML descriptor.

Let me know if this works and if you're still receiving error messages.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8838
Joined: Wed Aug 10, 2005 12:56 pm

Postby mgoay » Wed Jul 19, 2006 11:48 pm

Awesome! That works. :D

I run MySQL 5.0.22.

Many thanks, Alec.

Regards,
Michael
mgoay
 
Posts: 3
Joined: Wed Jul 19, 2006 7:57 pm

Postby yaliang » Thu Jul 20, 2006 6:15 am

Dear Alec:

When I try to upgrade my OJS system from 2.1.0.1 to 2.1.1 with a full package, I got the following error message via the upgrade option of "If you are upgrading an existing installation of OJS 2.x, click here to proceed."

Errors occurred during installation:
A database error has occurred: Field 'last_run' doesn't have a default value

Could you give me any suggestion to solve the problem?

Thank you very much.

Yaliang
yaliang
 
Posts: 82
Joined: Tue Jul 11, 2006 1:11 am

Postby asmecher » Thu Jul 20, 2006 8:37 am

Hi Yaliang,

The above instructions should complete the upgrade, or, if you'd rather start the upgrade again from backup, run the following command first:
Code: Select all
ALTER TABLE scheduled_tasks MODIFY COLUMN last_run datetime;
Then perform the upgrade as usual. Either way will work.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8838
Joined: Wed Aug 10, 2005 12:56 pm

Postby yaliang » Mon Jul 24, 2006 7:45 am

Dear Alec:

Thanks for your help. :lol:
My ojs system was successfully updated.

Best wishes,

Yaliang
yaliang
 
Posts: 82
Joined: Tue Jul 11, 2006 1:11 am


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 10 guests