1
0
Fork 0
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:
Michael Koziarski 2008-02-15 23:16:01 +00:00
parent f3fd2b18b7
commit 3028ca5955

View file

@ -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