mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
establish mysql connection before dropping database
Signed-off-by: Michael Koziarski <michael@koziarski.com> [#63 state:committed]
This commit is contained in:
parent
a8fc494dbb
commit
a0bc480e1d
1 changed files with 1 additions and 0 deletions
|
@ -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']))
|
||||
|
|
Loading…
Reference in a new issue