Detecting Rails migrations before you deploy
There are a number of workflows for discovering pending Rails migrations. Most involve pushing the code up to an app server and running a Rake task to see if the schema is up to date. That's slow, not automatic, and can be a hassle.
Git can help by tagging your releases and comparing the changes in the db/migrations
directory. Your deployment framework can make that automatic so you don't accidentally deploy code with pending migrations.
I have written a plugin for Capistrano that does just that.
http://github.com/mydrive/capistrano-detect-migrations
or from Rubygems.org
gem install capistrano-detect-migrations
Written by relistan
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#