How to modify capistrano deploy to automatically run migrations in Rails 3.0

Amal Kumar S picture Amal Kumar S · Feb 4, 2011 · Viewed 7.7k times · Source

Right now, I have to run cap deploy and cap deploy:migrations if there are migrations to be run.

how I modify the cap deploy task to run migrations.

Answer

nickgrim picture nickgrim · Feb 4, 2011

Just add:

after "deploy:update_code", "deploy:migrate"

to your config/deploy.rb.