Sha256: d17e255b62e3a29fd46913dd11124445c8e8e4366ccce2c68b068cba376531ea
Contents?: true
Size: 674 Bytes
Versions: 1
Compression:
Stored size: 674 Bytes
Contents
configuration = Capistrano::Configuration.respond_to?(:instance) ? Capistrano::Configuration.instance(:must_exist) : Capistrano.configuration(:must_exist) configuration.load do namespace :rollback do desc <<-DESC Rollbacks the migration to the version found in schema.rb file of the previous release path.\ Uses sed command to read the version from schema.rb file. DESC task :migrations do run "cd #{current_release}; rake db:migrate RAILS_ENV=#{rails_env} VERSION=`grep \":version =>\" #{previous_release}/db/schema.rb | sed -e 's/[a-z A-Z = \> \: \. \( \)]//g'`" end after "deploy:rollback","deploy:rollback:migrations" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
capistrano-db-rollback-0.1.0 | lib/capistrano-db-rollback.rb |