lib/capistrano/tasks/migrations.rake in capistrano-rails-1.1.5 vs lib/capistrano/tasks/migrations.rake in capistrano-rails-1.1.6

- old
+ new

@@ -9,13 +9,20 @@ info '[deploy:migrate] Checking changes in /db/migrate' if conditionally_migrate if conditionally_migrate && test("diff -q #{release_path}/db/migrate #{current_path}/db/migrate") info '[deploy:migrate] Skip `deploy:migrate` (nothing changed in db/migrate)' else info '[deploy:migrate] Run `rake db:migrate`' - within release_path do - with rails_env: fetch(:rails_env) do - execute :rake, "db:migrate" - end + invoke :'deploy:migrating' + end + end + end + + desc 'Runs rake db:migrate' + task migrating: [:set_rails_env] do + on primary fetch(:migration_role) do + within release_path do + with rails_env: fetch(:rails_env) do + execute :rake, 'db:migrate' end end end end