Skip to content
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: 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent f3fd2b1 commit 3028ca59559d4c39412cdb8e4211ac6e1bded413 @NZKoz NZKoz committed Feb 15, 2008
Showing with 1 addition and 0 deletions.
  1. +1 −0 railties/lib/tasks/databases.rake
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']}"`

0 comments on commit 3028ca5

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