Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ Performance/BindCall:
Performance/FlatMap:
Enabled: true

Performance/MapCompact:
Enabled: true

Performance/RedundantMerge:
Enabled: true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def synonyms(stream)

def _indexes(table, stream)
if (indexes = @connection.indexes(table)).any?
add_index_statements = indexes.map do |index|
add_index_statements = indexes.filter_map do |index|
case index.type
when nil
# do nothing here. see indexes_in_create
Expand All @@ -67,7 +67,7 @@ def _indexes(table, stream)
statement_parts = ["# unrecognized index #{index.name.inspect} with type #{index.type.inspect}"]
end
" " + statement_parts.join(", ") unless statement_parts.empty?
end.compact
end

return if add_index_statements.empty?

Expand Down