instance method schema_up_to_date?

Ruby on Rails 6.0.6

Since v6.0.6

Available in: v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

schema_up_to_date?(configuration, format = ActiveRecord::Base.schema_format, file = nil, environment = env, spec_name = "primary")

No documentation comment.

Parameters

configuration req
format opt = ActiveRecord::Base.schema_format
file opt = nil
environment opt = env
spec_name opt = "primary"
Source
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 341
      def schema_up_to_date?(configuration, format = ActiveRecord::Base.schema_format, file = nil, environment = env, spec_name = "primary")
        file ||= dump_filename(spec_name, format)

        return true unless File.exist?(file)

        ActiveRecord::Base.establish_connection(configuration)
        return false unless ActiveRecord::InternalMetadata.table_exists?
        ActiveRecord::InternalMetadata[:schema_sha1] == schema_sha1(file)
      end

Defined in activerecord/lib/active_record/tasks/database_tasks.rb line 341 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::Tasks::DatabaseTasks

Type at least 2 characters to search.

↑↓ navigate · open · esc close