David R Newman

db:migrate

Using rake's db:migrate is useful for creating/modifying table structures and data and it is quite nice how the way its designed basically give you a paper trail of your development, which I guess is better than hacking the MySQL database or whatever. Sometimes however you run rake db:migrate and it doesn't seem to make any difference. I how found that if you revert back to version 0 this can solve the problem:

  prompt>rake db:migrate VERSION=0
  prompt>rake db:migrate

Some output about what rake is migrating will be output and hopefully it will migrate all the stuff in your db/migrate/ folder.

<< Back to RoR Tips Index Page

Page written by David R Newman (drn[at]ecs.soton.ac.uk). Last updated June 27 2018 14:44:07.