Skip to content

Commit 099e5a3

Browse files
committed
run fix
1 parent 90cb374 commit 099e5a3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/fast_schema_dumper/fast_dumper.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def dump_table(table_name, columns:, indexes:, check_constraints:, options:)
315315
# Indexes
316316
# Rails orders indexes lexicographically by their column arrays
317317
# Example: ["a", "b"] < ["a"] < ["b", "c"] < ["b"] < ["d"]
318-
sorted_indexes = indexes.reject { |name, _| name == 'PRIMARY' }.sort_by do |index_name, index_data|
318+
sorted_indexes = indexes.except('PRIMARY').sort_by do |index_name, index_data|
319319
# Create an array padded with high values for comparison
320320
# This ensures that missing columns sort after existing ones
321321
max_cols = indexes.values.map { |data| data[:columns].size }.max || 1
@@ -347,7 +347,7 @@ def dump_table(table_name, columns:, indexes:, check_constraints:, options:)
347347
end
348348
end
349349

350-
check_clause.gsub!('\\'', "'") # don't escape single quotes for compatibility with the original dumper
350+
check_clause.gsub!("\\'", "'") # don't escape single quotes for compatibility with the original dumper
351351

352352
ck_line = " t.check_constraint \"#{check_clause}\""
353353

@@ -495,7 +495,7 @@ def format_default_value(default, data_type, column_type = nil)
495495
when 'json'
496496
(default == "'[]'") ? '[]' : '{}'
497497
else
498-
(/^'.*'$/.match?(default)) ? "\"#{default[1..-2]}\"" : default
498+
/^'.*'$/.match?(default) ? "\"#{default[1..-2]}\"" : default
499499
end
500500
end
501501

0 commit comments

Comments
 (0)