Sha256: 583f4ff43c331cfe21849bb0ae9cf46787e286e4c5c87ea1f7bf201b499a26ed

Contents?: true

Size: 505 Bytes

Versions: 13

Compression:

Stored size: 505 Bytes

Contents

# frozen_string_literal: true

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

      yield pool.connection
    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

13 entries across 13 versions & 4 rubygems

Version Path
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.3.4/lib/active_record/migration/pending_migration_connection.rb
activerecord-7.1.5.1 lib/active_record/migration/pending_migration_connection.rb
activerecord-7.1.5 lib/active_record/migration/pending_migration_connection.rb
activerecord-7.1.4.2 lib/active_record/migration/pending_migration_connection.rb
activerecord-7.1.4.1 lib/active_record/migration/pending_migration_connection.rb
activerecord-7.1.4 lib/active_record/migration/pending_migration_connection.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.3.4/lib/active_record/migration/pending_migration_connection.rb
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.3.4/lib/active_record/migration/pending_migration_connection.rb
activerecord-7.1.3.4 lib/active_record/migration/pending_migration_connection.rb
activerecord-7.1.3.2 lib/active_record/migration/pending_migration_connection.rb
activerecord-7.1.3.1 lib/active_record/migration/pending_migration_connection.rb
activerecord-7.1.3 lib/active_record/migration/pending_migration_connection.rb
activerecord-7.1.2 lib/active_record/migration/pending_migration_connection.rb