question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I’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:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
owen2345commented, Dec 10, 2016

Fixed!

0reactions
brian-kephartcommented, Dec 9, 2016

My active plugins are:

  • Attack
  • Front Cache
  • Cama Meta Tags
  • Visual Editor
  • Google Analytics
  • Camaleon Post Order
  • Import/Export Content
  • Visibility Posts
  • Authoring Posts

Also, I was previously using Camaleon Post Created At, which may have been active at the time of the error.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found