Rake db:migrate

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.

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs