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:
parent
dce49f83c8
commit
2ee8419813
2 changed files with 8 additions and 0 deletions
|
@ -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:
|
||||
|
|
|
@ -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']}"
|
||||
|
|
Loading…
Reference in a new issue