mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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
This commit is contained in:
parent
f3fd2b18b7
commit
3028ca5955
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue