aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/tasks
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-09-22 18:28:53 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-09-22 18:28:53 +0000
commit9809dc4540e17d98c10f90a6ef4131cd712fb8b2 (patch)
tree0f40e17cad8e470f824e79fdc6807f7e5ea2dff3 /railties/lib/tasks
parent05f173e2c2607e38cc4f86d53fbba8c832082208 (diff)
downloadrails-9809dc4540e17d98c10f90a6ef4131cd712fb8b2.tar.gz
rails-9809dc4540e17d98c10f90a6ef4131cd712fb8b2.tar.bz2
rails-9809dc4540e17d98c10f90a6ef4131cd712fb8b2.zip
Added VERBOSE option to rake db:migrate to turn off output #8204 [jbarnette]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7566 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/tasks')
-rw-r--r--railties/lib/tasks/databases.rake3
1 files changed, 2 insertions, 1 deletions
diff --git a/railties/lib/tasks/databases.rake b/railties/lib/tasks/databases.rake
index ef2c25663a..3bc4b04ae1 100644
--- a/railties/lib/tasks/databases.rake
+++ b/railties/lib/tasks/databases.rake
@@ -60,8 +60,9 @@ namespace :db do
drop_database(ActiveRecord::Base.configurations[RAILS_ENV || 'development'])
end
- desc "Migrate the database through scripts in db/migrate. Target specific version with VERSION=x"
+ desc "Migrate the database through scripts in db/migrate. Target specific version with VERSION=x. Turn off output with VERBOSE=false."
task :migrate => :environment do
+ ActiveRecord::Migration.verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true
ActiveRecord::Migrator.migrate("db/migrate/", ENV["VERSION"] ? ENV["VERSION"].to_i : nil)
Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby
end