# Rake db:migrate

**URL:** <https://www.ruby-forum.com/t/rake-db-migrate/157190>\
**Category:** Rails\
**Created:** [January 8, 2009, 10:18am UTC](https://www.ruby-forum.com/t/rake-db-migrate/157190 "2009-01-08T10:18:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alamodey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7feea3/32.png) [@alamodey](https://www.ruby-forum.com/u/alamodey)\
**Post date:** [January 8, 2009, 10:18am UTC](https://www.ruby-forum.com/t/rake-db-migrate/157190/1 "2009-01-08T10:18:39Z")

</div>

Hi, I’m new to Rails. Does rake db:migrate only process things under  
your /db/migrate/ folder? I made some changes in my /app/models/ files  
such as defining relationships between classes, but this doesn’t seem  
to be reflected in my underlying database. So how do I create foreign  
keys in Rails without doing it manually in my DBMS?

Thanks.

---

<div class="post-metadata">

**Author:** ![alamodey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7feea3/32.png) [@alamodey](https://www.ruby-forum.com/u/alamodey)\
**Post date:** [January 8, 2009, 10:20am UTC](https://www.ruby-forum.com/t/rake-db-migrate/157190/2 "2009-01-08T10:20:25Z")

</div>

On Jan 8, 3:34 am, alamodey [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi, I’m new to Rails. Does rake db:migrate only process things under  
> your /db/migrate/ folder?

Correct

> I made some changes in my /app/models/ files  
> such as defining relationships between classes, but this doesn’t seem  
> to be reflected in my underlying database. So how do I create foreign  
> keys in Rails without doing it manually in my DBMS?

You don’t. You create migrations that add those columns, keys etc…

Fred
