Browse files

establish mysql connection before dropping database

Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#63 state:committed]
  • Loading branch information...
1 parent a8fc494 commit a0bc480e1ddcaa015927c2d941e7b96a8ce4f6fa Aliaksey Kandratsenka committed with NZKoz Nov 28, 2008
Showing with 1 addition and 0 deletions.
  1. +1 −0 railties/lib/tasks/databases.rake
View
1 railties/lib/tasks/databases.rake
@@ -398,6 +398,7 @@ end
def drop_database(config)
case config['adapter']
when 'mysql'
+ ActiveRecord::Base.establish_connection(config)
ActiveRecord::Base.connection.drop_database config['database']
when /^sqlite/
FileUtils.rm(File.join(RAILS_ROOT, config['database']))

0 comments on commit a0bc480

Please sign in to comment.