instance method schema_version

Ruby on Rails 7.1.6

Since v7.0.10

Available in: v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

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 880
      def schema_version
        migration_context.current_version
      end

Defined in activerecord/lib/active_record/connection_adapters/abstract_adapter.rb line 880 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::ConnectionAdapters::AbstractAdapter

Type at least 2 characters to search.

↑↓ navigate · open · esc close