instance method
schema_version
Ruby on Rails 7.2.3
Since v7.0.10Signature
schema_version()
Returns the version identifier of the schema currently available in the database. This is generally equal to the number of the highest- numbered migration that has been executed, or 0 if no schema information is present / the database is empty.
Source
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 874
def schema_version
pool.migration_context.current_version
end
Defined in activerecord/lib/active_record/connection_adapters/abstract_adapter.rb line 874
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::AbstractAdapter