I have a strange issue on my Ruby on Rails app.
SOMETIMES when a record is being created I get this error:
A ActiveRecord::StatementInvalid occurred in conversations#create:
Mysql2::Error: Column ‘created_at’ cannot be null: …
activerecord (3.2.8)
lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in
`query’
The query generated by activerecord is this:
INSERT INTO conversations
(archived_by_performer
,
archived_by_requester
, created_at
, deleted_by_performer
,
deleted_by_requester
, delta
, locked
, performer_hours_assigned
,
performer_hours_assigned_at
, performer_id
,
performer_seal_the_deal
, performer_seal_the_deal_at
, request_id
,
requester_hours_assigned
, requester_hours_assigned_at
,
requester_id
, requester_seal_the_deal
, requester_seal_the_deal_at
,
state
, talent_id
, unread
, updated_at
) VALUES (0, 0, NULL, 0,
0, 1, 0, 0, NULL, 4, 0, NULL, NULL, 0, NULL, 1, 0, NULL, ‘new’, 75, 4,
NULL)
It happens randomly.
Any idea???