Merge pull request #48824 from Shopify/sort-schema-cache

Sort SchemaCache members when dumping it
This commit is contained in:
Jean Boussier 2023-07-27 10:56:53 +02:00 committed by GitHub
commit 8c23eaa4eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -278,10 +278,10 @@ module ActiveRecord
end
def encode_with(coder) # :nodoc:
coder["columns"] = @columns
coder["primary_keys"] = @primary_keys
coder["data_sources"] = @data_sources
coder["indexes"] = @indexes
coder["columns"] = @columns.sort.to_h
coder["primary_keys"] = @primary_keys.sort.to_h
coder["data_sources"] = @data_sources.sort.to_h
coder["indexes"] = @indexes.sort.to_h
coder["version"] = @version
coder["database_version"] = @database_version
end