1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

No verbose backtrace by db:drop when database does not exist.

This commit is contained in:
Kenn Ejima 2014-07-25 11:40:28 -07:00
parent dce49f83c8
commit 2ee8419813
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,9 @@
* No verbose backtrace by db:drop when database does not exist.
Fixes #16295.
*Kenn Ejima*
* Add support for Postgresql JSONB.
Example:

View file

@ -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']}"