Dirk
2007-Oct-10 14:41 UTC
how can I use a the current_timestamp feature of a database without a magial column
Hi , I''m looking for a way to create columns with a default current_stamp with the db:migrate feature. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
William Pratt
2007-Oct-10 17:44 UTC
Re: how can I use a the current_timestamp feature of a database without a magial column
Create a column called created_at with :datetime as the type. You can also create updated_at in the same way. It will be updated every time the record is. -Bill Dirk wrote:> Hi , > > I''m looking for a way to create columns with a default current_stamp > with the db:migrate feature. > > > > >-- Sincerely, William Pratt --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---