Skip to content
Browse files

Ensure db:drop:all doesn't error out on exception [#2997 state:resolv…

…ed] [Anthony Caliendo]
  • Loading branch information...
1 parent 7f84f14 commit ed8a0a1c2370ab8715434ba824b2826d807401d5 @lifo lifo committed Aug 8, 2009
Showing with 6 additions and 2 deletions.
  1. +6 −2 railties/lib/tasks/databases.rake
View
8 railties/lib/tasks/databases.rake
@@ -101,8 +101,12 @@ namespace :db do
ActiveRecord::Base.configurations.each_value do |config|
# Skip entries that don't have a database key
next unless config['database']
- # Only connect to local databases
- local_database?(config) { drop_database(config) }
+ begin
+ # Only connect to local databases
+ local_database?(config) { drop_database(config) }
+ rescue Exception => e
+ puts "Couldn't drop #{config['database']} : #{e.inspect}"
+ end
end
end
end

0 comments on commit ed8a0a1

Please sign in to comment.
Something went wrong with that request. Please try again.