There is some duplication here, can we extract it into a method?

Something like:

```
def db_connect(db_conf)
  if db_conf['adapter'] == 'em_postgresql'
    # drop and create need to be performed with a connection to the 'postgres' (system) database
    ActiveRecord::Base.establish_connection db_conf.merge('database' => 'postgres', 'schema_search_path' => 'public')
  else
    ActiveRecord::Base.establish_connection(db_conf)
  end

  db_conf # might not need to return this
end
```