From 3028ca59559d4c39412cdb8e4211ac6e1bded413 Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Fri, 15 Feb 2008 23:16:01 +0000 Subject: Clear active connections before trying to drop the database. Allows db:drop to work with posgresql. Closes #10559 [jqr] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8876 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/lib/tasks/databases.rake | 1 + 1 file changed, 1 insertion(+) diff --git a/railties/lib/tasks/databases.rake b/railties/lib/tasks/databases.rake index 7d18df1873..00c0fa4072 100644 --- a/railties/lib/tasks/databases.rake +++ b/railties/lib/tasks/databases.rake @@ -344,6 +344,7 @@ def drop_database(config) when /^sqlite/ FileUtils.rm(File.join(RAILS_ROOT, config['database'])) when 'postgresql' + ActiveRecord::Base.clear_active_connections! `dropdb "#{config['database']}"` end end -- cgit v1.2.3