Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use connection.schema_version inside ActiveRecord::SchemaCache #48838

Merged
merged 1 commit into from Jul 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -130,7 +130,7 @@ def load_cache(connection)

if self.class.check_schema_cache_dump_version
begin
current_version = connection.migration_context.current_version
current_version = connection.schema_version

if new_cache.version(connection) != current_version
warn "Ignoring #{@cache_path} because it has expired. The current schema version is #{current_version}, but the one in the schema cache file is #{new_cache.schema_version}."
Expand Down Expand Up @@ -375,7 +375,7 @@ def database_version(connection) # :nodoc:
end

def version(connection)
@version ||= connection.migration_context.current_version
@version ||= connection.schema_version
end

def schema_version
Expand Down