method
schema_up_to_date?
v6.0.0 -
Show latest stable
- Class:
ActiveRecord::Tasks::DatabaseTasks
schema_up_to_date?(configuration, format = ActiveRecord::Base.schema_format, file = nil, environment = env, spec_name = "primary")public
No documentation available.
# 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