diff options
Diffstat (limited to 'railties/lib/tasks/databases.rake')
-rw-r--r-- | railties/lib/tasks/databases.rake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/tasks/databases.rake b/railties/lib/tasks/databases.rake index 0fefc0433a..93aec674ab 100644 --- a/railties/lib/tasks/databases.rake +++ b/railties/lib/tasks/databases.rake @@ -440,7 +440,7 @@ def drop_database(config) ActiveRecord::Base.establish_connection(config) ActiveRecord::Base.connection.drop_database config['database'] when /^sqlite/ - FileUtils.rm(File.join(RAILS_ROOT, config['database'])) + FileUtils.rm((config['database'] =~ /^\// ? config['database'] : File.join(RAILS_ROOT, config['database']))) when 'postgresql' ActiveRecord::Base.establish_connection(config.merge('database' => 'postgres', 'schema_search_path' => 'public')) ActiveRecord::Base.connection.drop_database config['database'] |