diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-07-09 15:46:29 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-07-09 15:46:29 +0000 |
commit | 47a3bafe26fb5f773ac082162c3e595ce80d9ad7 (patch) | |
tree | 1574a44c26b5f1102cd96b188933728289f7c7cb /railties/fresh_rakefile | |
parent | 8266867881e708813eec3c359869d14098e3789d (diff) | |
download | rails-47a3bafe26fb5f773ac082162c3e595ce80d9ad7.tar.gz rails-47a3bafe26fb5f773ac082162c3e595ce80d9ad7.tar.bz2 rails-47a3bafe26fb5f773ac082162c3e595ce80d9ad7.zip |
Added a VERSION parameter to the migrate task that allows you to do "rake migrate VERSION=34" to migrate to the 34th version traveling up or down depending on the current version. Added ActiveRecord::Migrator.migrate that can figure out whether to go up or down based on the target version and the current
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1780 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/fresh_rakefile')
-rwxr-xr-x | railties/fresh_rakefile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/fresh_rakefile b/railties/fresh_rakefile index 46bb73ef86..ac17c75546 100755 --- a/railties/fresh_rakefile +++ b/railties/fresh_rakefile @@ -187,7 +187,7 @@ task :clear_logs => :environment do end end -desc "Migrate the database according to the migrate scripts in db/migrate" +desc "Migrate the database according to the migrate scripts in db/migrate (only supported on PG/MySQL). A specific version can be targetted with VERSION=x" task :migrate => :environment do - ActiveRecord::Migrator.up(File.dirname(__FILE__) + '/db/migrate/') + ActiveRecord::Migrator.migrate(File.dirname(__FILE__) + '/db/migrate/', ENV["VERSION"]) end
\ No newline at end of file |