not null constraint error when recording 'Revisions Required

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

Moderators: jmacgreg, michael, John

Forum rules
The Public Knowledge Project Support Forum is moving to

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: 1
Joined: Tue Jan 08, 2008 1:46 pm

not null constraint error when recording 'Revisions Required

Postby mbjones » Tue Jan 08, 2008 1:59 pm


Thanks for the great software. I'm looking forward to using OCS for our conference, but I ran into a database error that prevents the review system from working properly for me. I'm getting a database error using OCS 2.0.0-1 and postgres 7.4. The problem is that when a Director tries to record "Revisions Required" for the decision for a paper, a database error is thrown:

"ERROR: null value in column "type" violates not-null constraint"

causing the action to fail. You can see the error text and more details in my bug report ( This appears to be related to bug # 3004 where the not null constraint on edit_decisions.type column was apparently removed. However, from psql I see that the not null constraint is still intact on my copy of the database (see psql output in the bug report). Does release 2.0.0-1 not have the changes that were made in Bug # 3004?

Looking at the code in: line 166
it appears that no attempt to provide a value for the type column is made with the SQL insert, and so the not null constraint can't possibly be satisfied. Could this be the problem? Is it safe for me to remove the not null constraint on that column? Or should the SQL insert be providing a value for 'type'?

Thanks for your advice and help.


Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: not null constraint error when recording 'Revisions Required

Postby asmecher » Tue Jan 08, 2008 4:09 pm

Hi Matt,

The fix for that bug is not included in OCS 2.0; it'll be included in the next release. In the meantime, it's safe to drop the NOT NULL constraint on that column.

Alec Smecher
Public Knowledge Project Team

Return to “OCS Technical Support”

Who is online

Users browsing this forum: No registered users and 1 guest