method

schema_up_to_date?

schema_up_to_date?(configuration, _ = nil, file = nil)
public

No documentation available.

# File activerecord/lib/active_record/tasks/database_tasks.rb, line 396
      def schema_up_to_date?(configuration, _ = nil, file = nil)
        db_config = resolve_configuration(configuration)

        file ||= schema_dump_path(db_config)

        return true unless file && File.exist?(file)

        with_temporary_pool(db_config) do |pool|
          internal_metadata = pool.internal_metadata
          return false unless internal_metadata.enabled?
          return false unless internal_metadata.table_exists?

          internal_metadata[:schema_sha1] == schema_sha1(file)
        end
      end