tappind
2009-Mar-11 18:07 UTC
Newbie question on adding columns and references to existing table
I took a run at the blog tutorial and now I am working on my first Ruby app. I have two models with the same relationship as the post / comments example in the blog tutorial. When I created the second model I forgot to add the ''reference'' column to link the two together. I can''t seem to find anywhere the correct way to fix this and in general to add columns to an existing database table. Thanks, Dan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Bob Martens
2009-Mar-11 18:12 UTC
Re: Newbie question on adding columns and references to existing table
Migrations. Look into migrations. You can add, remove, change, etc. columns and anything in the database through migrations. On Mar 11, 1:07 pm, tappind <d...-JqThSvf2fuj3fQ9qLvQP4Q@public.gmane.org> wrote:> I took a run at the blog tutorial and now I am working on my first > Ruby app. I have two models with the same relationship as the post / > comments example in the blog tutorial. > > When I created the second model I forgot to add the ''reference'' column > to link the two together. > > I can''t seem to find anywhere the correct way to fix this and in > general to add columns to an existing database table. > > Thanks, > > Dan--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---