Unable to create issues - Get 500 internal error
Added by Paul Graham over 10 years ago
Hi All
I have recently imported an postgresql database into my new redmine from an older server. Now everything came up ok etc. I can edit successfully previously created issues that were imported in.
However what I cannot do is create new ones.
I get a 500 server error when I do and when I look at the production.log I get the following dump
ActiveRecord::StatementInvalid (PG::NotNullViolation: ERROR: null value in column "position" violates not-null constraint
DETAIL: Failing row contains (2897, 11, 128, eee, eee, null, null, 1, 51, 4, null, 51, 0, 2014-07-09 15:24:54.454104, 2014-07-09 15:24:54.454104, 2014-07-09, 0, null, null, null, 1, 2, f,$
: INSERT INTO "issues" ("assigned_to_id", "author_id", "category_id", "closed_on", "created_on", "description", "done_ratio", "due_date", "estimated_hours", "fixed_version_id", "is_private$
app/models/issue.rb:165:in `create_or_update'
app/controllers/issues_controller.rb:150:in `create'
However I am fairly new to all this stuff so I dont know what that means. And I couldnt find much on google pertaining to it. I was wondering if any of you kind souls might have an incite in to what my issue might be?
Thanks Kindly
Paul
Replies (3)
RE: Unable to create issues - Get 500 internal error - Added by Rupesh Helwade over 10 years ago
AS the log suggests, the Null constraint is violated which is not allowing the application to insert new values.
You should change this constraint on "issues" table for columns where the Null values are being inserted.
RE: Unable to create issues - Get 500 internal error - Added by Paul Graham over 10 years ago
Thankyou for the answer
How would I go about that? Would you know?
Thanks
Paul
RE: Unable to create issues - Get 500 internal error - Added by Rupesh Helwade over 10 years ago
http://stackoverflow.com/questions/5273717/drop-constraint-by-name-in-postgresql
Hope this link helps.
YOu need to go to the potgres sql command prompt and run this command.
YOu may have used it while importing your old data.