Class: ActiveRecord::PendingMigrationConnection

Inherits:
Object
  • Object
show all
Defined in:
lib/active_record/migration/pending_migration_connection.rb

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.current_preventing_writesObject



17
18
19
# File 'lib/active_record/migration/pending_migration_connection.rb', line 17

def self.current_preventing_writes
  false
end

.primary_class?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/active_record/migration/pending_migration_connection.rb', line 13

def self.primary_class?
  false
end

.with_temporary_pool(db_config, &block) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/active_record/migration/pending_migration_connection.rb', line 5

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