method

db_configs_with_versions

db_configs_with_versions(environment = env)
public

No documentation available.

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

        with_temporary_pool_for_each(env: environment) do |pool|
          db_config = pool.db_config
          versions_to_run = pool.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