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 @@ -407,7 +407,7 @@ def column_definitions(table_name)
fields.map do |field|
dtype = field[1]
field[1] = crdb_fields[field[0]][2].downcase if re.match(dtype)
field[7] = crdb_fields[field[0]][1]&.gsub!(/^\'|\'?$/, '')
field[7] = crdb_fields[field[0]][1]
field[10] = true if crdb_fields[field[0]][3]
field
end
Expand Down Expand Up @@ -438,9 +438,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|
[field.first, field]
end
end

Expand Down