# How to reflect database change to model

**URL:** <https://www.ruby-forum.com/t/how-to-reflect-database-change-to-model/196494>\
**Category:** Rails\
**Created:** [October 18, 2007, 6:46pm UTC](https://www.ruby-forum.com/t/how-to-reflect-database-change-to-model/196494 "2007-10-18T18:46:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f9ae1b/32.png) [@nick](https://www.ruby-forum.com/u/nick)\
**Post date:** [October 18, 2007, 6:46pm UTC](https://www.ruby-forum.com/t/how-to-reflect-database-change-to-model/196494/1 "2007-10-18T18:46:11Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![nick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f9ae1b/32.png) [@nick](https://www.ruby-forum.com/u/nick)\
**Post date:** [October 18, 2007, 6:49pm UTC](https://www.ruby-forum.com/t/how-to-reflect-database-change-to-model/196494/2 "2007-10-18T18:49:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f9ae1b/32.png) [@nick](https://www.ruby-forum.com/u/nick)\
**Post date:** [October 18, 2007, 6:47pm UTC](https://www.ruby-forum.com/t/how-to-reflect-database-change-to-model/196494/3 "2007-10-18T18:47:21Z")

</div>

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
