Created
February 27, 2013 12:50
-
-
Save blatyo/5047690 to your computer and use it in GitHub Desktop.
Just creates a rake task that does the same as `db:migrate` for a different directory. Uses the same schema migrations table that migrations use. We don't migrate down for iterations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :iteration do | |
desc "Runs the tasks for the current iteration" | |
task :current => 'iteration:migrate' | |
desc 'Runs the unrun iteration tasks' | |
task :migrate => :environment do | |
mig = ActiveRecord::Migrator.new(:up, File.join(Rails.root, 'db', 'iterations')) | |
mig.migrate | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment