lib/capistrano/tasks/migrations.rake in capistrano-rails-1.2.0 vs lib/capistrano/tasks/migrations.rake in capistrano-rails-1.2.1
- old
+ new
@@ -5,14 +5,14 @@
desc 'Runs rake db:migrate if migrations are set'
task :migrate => [:set_rails_env] do
on fetch(:migration_servers) do
conditionally_migrate = fetch(:conditionally_migrate)
info '[deploy:migrate] Checking changes in db' if conditionally_migrate
- if conditionally_migrate && test("diff -q #{release_path}/db #{current_path}/db")
+ if conditionally_migrate && test(:diff, "-qr #{release_path}/db #{current_path}/db")
info '[deploy:migrate] Skip `deploy:migrate` (nothing changed in db)'
else
info '[deploy:migrate] Run `rake db:migrate`'
- invoke :'deploy:migrating'
+ invoke :'deploy:migrating' unless Rake::Task[:'deploy:migrating'].already_invoked
end
end
end
desc 'Runs rake db:migrate'