Forum: Ruby on Rails MySQL adapter bug? Date col being set to NULL when default i

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
rovnak (Guest)
on 2007-05-06 12:35
(Received via mailing list)
Ok, simple case. MySQL table with date column. The date column default
is 0000-00-00.

When I view these rows in say SQLyog, all rows in this table have
value of  0000-00-00. by default.

Now, onto my Rails app. I don't even care about the date column
described above. I am attempting to update an entirely different
column in the same table.

However, when I use an active record to update the other column, my
update fails because ActiveRecord is submitting "NULL" for the date
column in question.

ActiveRecord::StatementInvalid (Mysql::Error: Column was set to data
type implicit default; NULL supplied for NOT NULL column
'birthday_search' at row 1: UPDATE vb_user SET `birthday_search` =

What is happening here? This seems like an obvious bug, no?
This topic is locked and can not be replied to.