method

db_configs_with_versions

db_configs_with_versions(db_configs)
public

No documentation available.

# File activerecord/lib/active_record/tasks/database_tasks.rb, line 271
      def db_configs_with_versions(db_configs) # :nodoc:
        db_configs_with_versions = Hash.new { |h, k| h[k] = [] }

        db_configs.each do |db_config|
          ActiveRecord::Base.establish_connection(db_config)
          versions_to_run = ActiveRecord::Base.connection.migration_context.pending_migration_versions
          target_version = ActiveRecord::Tasks::DatabaseTasks.target_version

          versions_to_run.each do |version|
            next if target_version && target_version != version
            db_configs_with_versions[version] << db_config
          end
        end

        db_configs_with_versions
      end