NotNullViolation
See original GitHub issueI’m getting the following error:
PG::NotNullViolation: ERROR: null value in column "created_at" violates not-null constraint DETAIL: Failing row contains (181, My Post Title, my-slug, , , draft, null, null, public, , Post, null, 2016-12-06 18:38:42.334616, 5, 72, 2, f)
ActiveRecord::StatementInvalid: PG::NotNullViolation: ERROR: null value in column "created_at" violates not-null constraint
DETAIL: Failing row contains (181, My Post Title, my-slug, , , draft, null, null, public, , Post, null, 2016-12-06 18:38:42.334616, 5, 72, 2, f).
: UPDATE "cama_posts" SET "created_at" = $1, "updated_at" = $2 WHERE "cama_posts"."id" = $3
I’m on Heroku using PostgreSQL. The above error seems to happen when anyone creates a draft of a post. It’s only appeared in the past week or so, though I can’t verify for sure that we were saving posts as drafts before that. Any ideas why this is happening?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
ruby - Getting NotNullViolation when passing Data through ...
I'm getting above error when passing data through simple_form_for. My view, controller and database file is included below. This looks like I am ......
Read more >ActiveRecord::NotNullViolation - Rails API
Raised when a record cannot be inserted or updated because it would violate a not null constraint.
Read more >ActiveRecord::NotNullViolation - APIdock
Raised when a record cannot be inserted or updated because it would violate a not null constraint. Show files where this class is...
Read more >NotNullViolation: ERROR: null value in column "id" violates ...
My normal tests all went fine and gitlab was working nice. But then I tested to create a new project: PG::NotNullViolation: ERROR: null...
Read more >2030735 – Satellite upgrade to 6.10 fails with error ' null value ...
Getting the full traceback for 'ActiveRecord::NotNullViolation: PG::NotNullViolation: ERROR: null value in column "repository_href" violates ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Fixed!
My active plugins are:
Also, I was previously using Camaleon Post Created At, which may have been active at the time of the error.