I have a column in a postgres database that keeps track of a date, but for some reason I set it up to use a timestamp, ie. my migration says t.datetime :start_date but I want to switch this to the date type for my existing table. How can I do this using migrations? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
See http://guides.rubyonrails.org/migrations.html, particularly the change_column command Simon On Tue, 26 Jan 2010 17:11:41 +0800, eggie5 <eggie5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have a column in a postgres database that keeps track of a date, but > for some reason I set it up to use a timestamp, ie. my migration says > t.datetime :start_date but I want to switch this to the date type for > my existing table. How can I do this using migrations? >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
thank you this was the trick On Jan 26, 6:15 pm, "Simon Macneall" <macne...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Seehttp://guides.rubyonrails.org/migrations.html, particularly the > change_column command > > Simon > > > > On Tue, 26 Jan 2010 17:11:41 +0800, eggie5 <egg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I have a column in a postgres database that keeps track of a date, but > > for some reason I set it up to use a timestamp, ie. my migration says > > t.datetime :start_date but I want to switch this to the date type for > > my existing table. How can I do this using migrations?-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.