class method
self.load_schema_if_pending!
Ruby on Rails edge
Since v4.1.16Signature
self.load_schema_if_pending!()
No documentation comment.
Source
# File activerecord/lib/active_record/migration.rb, line 708
def load_schema_if_pending!
any_schema_needs_update = false
pending_migrations = []
db_configs_in_current_env.each do |db_config|
ActiveRecord::PendingMigrationConnection.with_temporary_pool(db_config) do |pool|
any_schema_needs_update ||= schema_needs_update?(db_config, pool)
pending = pool.migration_context.open.pending_migrations
pending_migrations.concat(pending)
end
end
if any_schema_needs_update
load_schema!
pending_migrations = []
db_configs_in_current_env.each do |db_config|
ActiveRecord::PendingMigrationConnection.with_temporary_pool(db_config) do |pool|
pending = pool.migration_context.open.pending_migrations
pending_migrations.concat(pending)
end
end
end
check_pending_migrations(pending_migrations)
end
Defined in activerecord/lib/active_record/migration.rb line 708
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Migration