Method not available on this version
This method is only available on newer versions.
The first available version (v7.2.3) is shown here.
current_version()
public
For cases where a table doesn’t exist like loading from schema cache
# File activerecord/lib/active_record/migration.rb, line 1413
def current_version
connection_pool = ActiveRecord::Tasks::DatabaseTasks.migration_connection_pool
schema_migration = SchemaMigration.new(connection_pool)
internal_metadata = InternalMetadata.new(connection_pool)
MigrationContext.new(migrations_paths, schema_migration, internal_metadata).current_version
end