OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



problem with database migration

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.

problem with database migration

Postby ifchinfo » Wed Sep 12, 2012 5:45 pm

Hi,

I'm having problem to migrate the database to version 2.4.0.
It generated the following message "An error occurred database: ERROR: null value in column" review_round_id "violates not null constraint".

Has anyone encountered this problem?

Tineu.
ifchinfo
 
Posts: 4
Joined: Wed Sep 12, 2012 5:09 pm

Re: problem with database migration

Postby JasonNugent » Sat Sep 15, 2012 3:56 am

Hi ifchinfo,

Is this a Postgres installation? It's probably a casting error. If you let me know I can have a look.

Cheers,
Jason
JasonNugent
Site Admin
 
Posts: 849
Joined: Tue Jan 10, 2006 6:20 am

Re: problem with database migration

Postby ifchinfo » Tue Sep 18, 2012 3:16 pm

Hi Jason,

It is therefore postgresql.
What you need me to send?

Ifchinfo
ifchinfo
 
Posts: 4
Joined: Wed Sep 12, 2012 5:09 pm

Re: problem with database migration

Postby ifchinfo » Thu Sep 20, 2012 6:00 pm

Hi Jason,

It is therefore postgresql.
What you need me to send?

Ifchinfo

JasonNugent wrote:Hi ifchinfo,

Is this a Postgres installation? It's probably a casting error. If you let me know I can have a look.

Cheers,
Jason
ifchinfo
 
Posts: 4
Joined: Wed Sep 12, 2012 5:09 pm

Re: problem with database migration

Postby adrianojam » Thu Jan 31, 2013 12:24 pm

Hi, I have the same problem now. How can I fix them?
adrianojam
 
Posts: 1
Joined: Thu Jan 31, 2013 12:23 pm

Re: problem with database migration

Postby asmecher » Fri Feb 01, 2013 1:49 pm

Hi all,

Please turn on show_stacktrace and re-generate the error message; post the resulting stack trace here.

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

Re: problem with database migration

Postby ifchinfo » Mon May 27, 2013 8:08 am

Hi.

I did turn on show_stacktrace but no additional information was generated.
I'm trying the upgrade using the cli command: "php tools/upgrade.php upgrade".
Perhaps the stacktrace option saves information to a specific file but I dont know where it could be.

Anyway, my information should be all you need to identify the problem.

The column review_round_id exists in two tables:
1 - review_rounds: it's ok, all values are filled;

2 - review_assignments: it's not ok because this table was accepting not null values before 2.4.0 metadata definition!

There are at least two possible corrections:

a - remove the "notnull" restriction for the field review_round_id / table review_assignments from the metadata definition at reviews.xml

b - rewrite the upgrade script to fill information at the field before it turns on the not null restriction.


I cant say which one should be used because I dont know the impacts it will bring to the rest of the system.
ifchinfo
 
Posts: 4
Joined: Wed Sep 12, 2012 5:09 pm

Re: problem with database migration

Postby asmecher » Mon May 27, 2013 9:42 am

Hi ifchinfo,

Relax the NOT NULL restriction before performing the upgrade; you should be fine with null data there for the sake of OJS. (I believe the restriction is appropriate for OMP but not OJS.)

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


Return to OJS Technical Support

Who is online

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

cron