When I deploy an update that has new migrations, I would like to run "cap deploy:migrations", which I believe is just a normal deploy plus a "rake db:migrate" in the new release's directory.
However, when I run that command, capistrano runs "rake db:migrate" in the "current" folder BEFORE the symlink is updated. Here's the full gist of my "cap deploy:migrations": https://gist.github.com/1566372 The relevant part is here: * 11:46:35 == Currently executing `deploy:migrate' * executing "cd /home/deploy/staging.example.com/current; bundle exec rake db:migrate RAILS_ENV=staging" servers: ["staging.example.com"] [staging.example.com] executing command command finished in 38096ms * 11:47:13 == Currently executing `deploy:symlink' * executing "rm -f /home/deploy/staging.example.com/current && ln -s / home/deploy/staging.example.com/releases/20120105174430 /home/deploy/ staging.example.com/current" servers: ["staging.example.com"] [staging.example.com] executing command command finished in 232ms triggering after callbacks for `deploy:symlink' Shouldn't the migrations run in "current" AFTER the symlink? Or, shouldn't they run in the non-symlinked directory containing the new code? I have to run "cap deploy:migrate" manually after every deploy. Here's my deploy script: https://gist.github.com/1566380 -- * You received this message because you are subscribed to the Google Groups "Capistrano" group. * To post to this group, send email to [email protected] * To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/capistrano?hl=en
