On Jul 27, 1:32 pm, Drunkguy <[email protected]> wrote:
> I am writing a script to move data from one database to another.   I
> keep get this error when I query the first database.
>
> Sequel::InvalidValue: Invalid Date value "0000-00-00" (invalid date)
>         from /Library/Ruby/Gems/1.8/gems/sequel-3.2.0/lib/sequel/
> core.rb:151:in `string_to_date'
>
> This is an older database, so the columns that have 0000-00-00 should
> really have NULL.  Do I need to clean up the database or is there a
> way I can work around it?

The Sequel::MySQL.convert_invalid_date_time setting exists for this
purpose.  See 
http://sequel.rubyforge.org/rdoc-adapters/classes/Sequel/MySQL.html.

Jeremy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to