Sha256: aafef45587d0404262f87573a0d59d6e3a1aa60e45c6c957f95ada2598f36a87

Contents?: true

Size: 483 Bytes

Versions: 23

Compression:

Stored size: 483 Bytes

Contents

# frozen_string_literal: true

module ActiveRecord
  class PendingMigrationConnection # :nodoc:
    def self.with_temporary_pool(db_config, &block)
      pool = ActiveRecord::Base.connection_handler.establish_connection(db_config, owner_name: self)

      yield pool
    ensure
      ActiveRecord::Base.connection_handler.remove_connection_pool(self.name)
    end

    def self.primary_class?
      false
    end

    def self.current_preventing_writes
      false
    end
  end
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
activerecord-8.0.1 lib/active_record/migration/pending_migration_connection.rb
activerecord-8.0.0.1 lib/active_record/migration/pending_migration_connection.rb
activerecord-7.2.2.1 lib/active_record/migration/pending_migration_connection.rb
activerecord-8.0.0 lib/active_record/migration/pending_migration_connection.rb
activerecord-7.2.2 lib/active_record/migration/pending_migration_connection.rb
activerecord-8.0.0.rc2 lib/active_record/migration/pending_migration_connection.rb
activerecord-7.2.1.2 lib/active_record/migration/pending_migration_connection.rb
activerecord-8.0.0.rc1 lib/active_record/migration/pending_migration_connection.rb
activerecord-7.2.1.1 lib/active_record/migration/pending_migration_connection.rb
activerecord-8.0.0.beta1 lib/active_record/migration/pending_migration_connection.rb
omg-activerecord-8.0.0.alpha9 lib/active_record/migration/pending_migration_connection.rb
omg-activerecord-8.0.0.alpha8 lib/active_record/migration/pending_migration_connection.rb
omg-activerecord-8.0.0.alpha7 lib/active_record/migration/pending_migration_connection.rb
omg-activerecord-8.0.0.alpha4 lib/active_record/migration/pending_migration_connection.rb
omg-activerecord-8.0.0.alpha3 lib/active_record/migration/pending_migration_connection.rb
omg-activerecord-8.0.0.alpha2 lib/active_record/migration/pending_migration_connection.rb
omg-activerecord-8.0.0.alpha1 lib/active_record/migration/pending_migration_connection.rb
activerecord-7.2.1 lib/active_record/migration/pending_migration_connection.rb
activerecord-7.2.0 lib/active_record/migration/pending_migration_connection.rb
activerecord-7.2.0.rc1 lib/active_record/migration/pending_migration_connection.rb