Fix lint issue in glitch-soc-only file

shrike
Claire 2023-12-20 22:25:23 +01:00
parent 01e77a0f34
commit b2961dad2b
1 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ module ActiveRecord
def self.new(direction, migrations, schema_migration, internal_metadata, target_version = nil) def self.new(direction, migrations, schema_migration, internal_metadata, target_version = nil)
migrated = Set.new(Base.connection.migration_context.get_all_versions) migrated = Set.new(Base.connection.migration_context.get_all_versions)
migrations.group_by(&:name).each do |_name, duplicates| migrations.group_by(&:name).each_value do |duplicates|
next unless duplicates.length > 1 && duplicates.all? { |m| ALLOWED_DUPLICATES.include?(m.version) } next unless duplicates.length > 1 && duplicates.all? { |m| ALLOWED_DUPLICATES.include?(m.version) }
# We have a set of allowed duplicates. Keep the migrated one, if any. # We have a set of allowed duplicates. Keep the migrated one, if any.
@ -47,7 +47,7 @@ module ActiveRecord
# A set of duplicated migrations is considered migrated if at least one of # A set of duplicated migrations is considered migrated if at least one of
# them is migrated. # them is migrated.
migrated = get_all_versions migrated = get_all_versions
migrations.group_by(&:name).each do |_name, duplicates| migrations.group_by(&:name).each_value do |duplicates|
return true unless duplicates.any? { |m| migrated.include?(m.version.to_i) } return true unless duplicates.any? { |m| migrated.include?(m.version.to_i) }
end end
false false