Skip to content
Merged
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
7 changes: 3 additions & 4 deletions lib/active_record/connection_adapters/cockroachdb_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ def column_definitions(table_name)
fields.map do |field|
dtype = field[f_type]
field[f_type] = crdb_fields[field[f_attname]][2].downcase if re.match(dtype)
field[f_comment] = crdb_fields[field[f_attname]][1]&.gsub!(/^\'|\'?$/, '')
field[f_comment] = crdb_fields[field[f_attname]][1]
field[f_is_hidden] = true if crdb_fields[field[f_attname]][3]
field
end
Expand Down Expand Up @@ -455,9 +455,8 @@ def crdb_column_definitions(table_name)
WHERE c.table_name = #{quote(table)}#{with_schema}
SQL

fields.reduce({}) do |a, e|
a[e[0]] = e
a
fields.to_h do |field|
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A nitpick, but reading this was hurting everytime 😅

[field.first, field]
end
end

Expand Down