Rake db:migrate


#1

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.


#2

On Jan 8, 3:34 am, alamodey 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