Skip to content

Instantly share code, notes, and snippets.

@Jamedjo
Created July 27, 2015 14:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jamedjo/df58acf9561dedb314d5 to your computer and use it in GitHub Desktop.
Save Jamedjo/df58acf9561dedb314d5 to your computer and use it in GitHub Desktop.
cap staging db:migrate
namespace :db do
%w[create migrate rollback seed setup version migrate:status].each do |command|
desc "Rake db:#{command}"
task command do
on roles(:app) do
within "#{current_path}" do
with rails_env: :production do
execute :rake, "db:#{command}"
end
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment