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

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/hyP3R8xK8-YJ.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to