Method: ActiveRecord::Migrator.current_version

Defined in:
activerecord/lib/active_record/migration.rb

.current_versionObject

For cases where a table doesn’t exist like loading from schema cache



1410
1411
1412
1413
1414
1415
1416
# File 'activerecord/lib/active_record/migration.rb', line 1410

def current_version
  connection_pool = ActiveRecord::Tasks::DatabaseTasks.migration_connection_pool
  schema_migration = SchemaMigration.new(connection_pool)
   = InternalMetadata.new(connection_pool)

  MigrationContext.new(migrations_paths, schema_migration, ).current_version
end