lib/capistrano/tasks/migrations.rake in capistrano-rails-0.0.7 vs lib/capistrano/tasks/migrations.rake in capistrano-rails-1.0.0

- old
+ new

@@ -1,14 +1,21 @@ namespace :deploy do desc 'Runs rake db:migrate if migrations are set' task :migrate do - on primary :db do + on primary fetch(:migration_role) do within release_path do - execute :rake, "db:migrate RAILS_ENV=#{fetch(:stage)}" + with rails_env: fetch(:rails_env) do + execute :rake, "db:migrate" + end end end end after 'deploy:updated', 'deploy:migrate' end +namespace :load do + task :defaults do + set :migration_role, fetch(:migration_role, :db) + end +end