SQLite: db:drop:all doesn't fail silently if the database is already open. Closes #10577.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8519 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jeremy Kemper
2008-01-02 08:28:58 +00:00
parent 42622f23b4
commit 072b9d9fba
2 changed files with 3 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
*SVN*
* SQLite: db:drop:all doesn't fail silently if the database is already open. #10577 [Cheah Chu Yeow, mrichman]
* Introduce native mongrel handler and push mutex into dispatcher. [Jeremy Kemper]
* Ruby 1.9 compatibility. #1689, #10546 [Cheah Chu Yeow, frederico]

View File

@@ -343,7 +343,7 @@ def drop_database(config)
when 'mysql'
ActiveRecord::Base.connection.drop_database config['database']
when /^sqlite/
FileUtils.rm_f(File.join(RAILS_ROOT, config['database']))
FileUtils.rm(File.join(RAILS_ROOT, config['database']))
when 'postgresql'
`dropdb "#{config['database']}"`
end