diff options
author | Kenn Ejima <kenn.ejima@gmail.com> | 2014-07-25 11:40:28 -0700 |
---|---|---|
committer | Kenn Ejima <kenn.ejima@gmail.com> | 2014-07-27 14:34:01 -0700 |
commit | 2ee8419813b643f92344097d1c8460f045967480 (patch) | |
tree | 9abcf39fd6fae4d4187fb3eccf591bfe52a72789 /activerecord/lib | |
parent | dce49f83c806cf884a302b45bb69ebe1b62ad95b (diff) | |
download | rails-2ee8419813b643f92344097d1c8460f045967480.tar.gz rails-2ee8419813b643f92344097d1c8460f045967480.tar.bz2 rails-2ee8419813b643f92344097d1c8460f045967480.zip |
No verbose backtrace by db:drop when database does not exist.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/tasks/database_tasks.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/tasks/database_tasks.rb b/activerecord/lib/active_record/tasks/database_tasks.rb index 9bc23b5ec7..80186a88e3 100644 --- a/activerecord/lib/active_record/tasks/database_tasks.rb +++ b/activerecord/lib/active_record/tasks/database_tasks.rb @@ -110,6 +110,8 @@ module ActiveRecord def drop(*arguments) configuration = arguments.first class_for_adapter(configuration['adapter']).new(*arguments).drop + rescue ActiveRecord::NoDatabaseError + $stderr.puts "#{configuration['database']} does not exist" rescue Exception => error $stderr.puts error, *(error.backtrace) $stderr.puts "Couldn't drop #{configuration['database']}" |