How to reflect database change to model

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!

On 10/18/07, Nick [email protected] 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

On Oct 19, 9:42 am, “Isak H.” [email protected] wrote:

On 10/18/07, Nick [email protected] 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