diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-08-08 17:53:47 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-08-08 17:53:51 +0100 |
commit | ed8a0a1c2370ab8715434ba824b2826d807401d5 (patch) | |
tree | bc352e3fff60944c28413a9cf67eb87bdb3b79a6 /railties/lib | |
parent | 7f84f14efabf3e342a231b8aa9650cb484c802d6 (diff) | |
download | rails-ed8a0a1c2370ab8715434ba824b2826d807401d5.tar.gz rails-ed8a0a1c2370ab8715434ba824b2826d807401d5.tar.bz2 rails-ed8a0a1c2370ab8715434ba824b2826d807401d5.zip |
Ensure db:drop:all doesn't error out on exception [#2997 state:resolved] [Anthony Caliendo]
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/tasks/databases.rake | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/railties/lib/tasks/databases.rake b/railties/lib/tasks/databases.rake index b00a789974..23a3a73a7f 100644 --- a/railties/lib/tasks/databases.rake +++ b/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 |