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
上级 05f173e2
*SVN*
* Added VERBOSE option to rake db:migrate to turn off output #8204 [jbarnette]
* Fixed that rake doc:app should use UTF-8 #8906 [farzy]
* Fixes rake annotations to search erb and builder files as well #9150 [m.langenberg]
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册