rovnak
2007-May-06 08:34 UTC
MySQL adapter bug? Date col being set to NULL when default is 0000-00-00
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` NULL, What is happening here? This seems like an obvious bug, no? --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---