Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Clear active connections before trying to drop the database. Allows d…

…b:drop to work with posgresql. Closes #10559 [jqr]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8876 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 3028ca59559d4c39412cdb8e4211ac6e1bded413 1 parent f3fd2b1
@NZKoz NZKoz authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  railties/lib/tasks/databases.rake
View
1  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
Please sign in to comment.
Something went wrong with that request. Please try again.