def [](orm, connection: nil, **)
      if connection.nil?
        if orm.is_a? String
          connection = orm
        elsif orm.is_a?(Hash) && orm.key?(:connection)
          connection = orm[:connection]
        end
      end
      super connection
    end
def [](orm, connection: nil, **)
      if connection.nil?
        if orm.is_a? String
          connection = orm
        elsif orm.is_a?(Hash) && orm.key?(:connection)
          connection = orm[:connection]
        end
      end
      super connection
    end
In order to add another database to cleanup, you can give its connection name in one of the forms below:

    # the simplest form
    DatabaseRewinder['the_db_name']

 or

    # with connection: key
    DatabaseRewinder[connection: 'the_db_name']

 or

    # DatabaseCleaner compatible
    DatabaseRewinder[:active_record, connection: 'the_db_name']

 You can cleanup multiple databases for each test using this configuration.