El Martes, 19 de Enero de 2010, Iñaki Baz Castillo escribió: > El Martes, 19 de Enero de 2010, Iñaki Baz Castillo escribió: > > I've also tryed with: > > > > column :modified, DateTime, :default => > > Sequel::SQL::Function.new(:now) > > > > and: > > > > column :modified, DateTime, :default => :now.sql_function > > > > but no luck, it raises an error: > > > > "Sequel::DatabaseError: Mysql::Error: Invalid default value for > > 'modified'" > > But both methods work for Postgres !!! > > So it seems a bug, am I right?
Sorry for so many mails, I should summarize them after the research... Well, in MySQL it works if I do: column :modified, "timestamp", :default => :now.sql_function I've read that MySQL DateTime doesn't allow "NOW()" as defult value. -- Iñaki Baz Castillo <[email protected]>
-- 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.
