Hi, all When database schema changed dynamically, like you add new column, or create new table. The model will not reflect on those changes. How does active_record handle this situation? Which class or method I need to look into it? Thank a lot! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi, all When database schema changed dynamically, like you add new column, or create new table. The model will not reflect on those changes. How does active_record handle this situation? Which class or method I need to look into it? Thank a lot! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
You are meant to user the migration feature of rake to create new columns and tables. That keeps the schema and model tightly locked. It''s killing me how cool it is. --Colin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 18 Oct 2007, at 17:45, Nick wrote:> > Hi, all > > When database schema changed dynamically, like you add new column, or > create new table. The model will not > reflect on those changes. How does active_record handle this > situation? Which class or method I need to look into it? > Thank a lot! >reset_column_information Fred --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 10/18/07, Nick <nextsoon-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:> > Hi, all > > When database schema changed dynamically, like you add new column, or > create new table. The model will not > reflect on those changes. How does active_record handle this > situation? Which class or method I need to look into it? > Thank a lot! >Just a friendly warning; It''s *very* unlikely that you should be changing the db schema dynamically. Do consider having someone review your design. Sincerely, Isak --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Oct 19, 9:42 am, "Isak Hansen" <isak.han...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 10/18/07, Nick <nexts...-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:> > Just a friendly warning; It''s *very* unlikely that you should be > changing the db schema dynamically. > > Do consider having someone review your design.Sometimes legacy databases leave you no choice but to layer the same model over different database tables. You then have to think about how to reference columns when presenting data to the user. I''m ''lucky'' (if anyone who has to work with legacy databases in RoR can be called lucky), in my case I have another table which tells me what''s in the first table. Allan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---