Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 8876

Show
Ignore:
Timestamp:
02/15/08 23:16:01 (8 months ago)
Author:
nzkoz
Message:

Clear active connections before trying to drop the database. Allows db:drop to work with posgresql. Closes #10559 [jqr]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/railties/lib/tasks/databases.rake

    r8535 r8876  
    345345    FileUtils.rm(File.join(RAILS_ROOT, config['database'])) 
    346346  when 'postgresql' 
     347    ActiveRecord::Base.clear_active_connections!     
    347348    `dropdb "#{config['database']}"` 
    348349  end