Hi,

I just realised I've done something stupid on a migration:

     DateTime :sent_on, :null=>false, :default=>Time.now


Which sets the field to Thursday night when I ran the migration :-D

Does anyone know what I should actually put to get the default I wanted? It's 
for a sqlite3 database if that's any help. I've tried passing in the sqlite 
function as a string, but it gets used literally.


     DateTime :sent_on, :null=>false, :default=> "(datetime('now','localtime'))"


Any help is much appreciated.



Regards,
Iain

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