Skip to content

Commit b88bad7

Browse files
committed
fix: correctly infer text[] columns
1 parent 661ace4 commit b88bad7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/anchor/types/inference/active_record.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def from(column, check_config: true)
3232
return Anchor.config.ar_column_to_type.call(column) if check_config && Anchor.config.ar_column_to_type
3333
type = from_sql_type(column.type)
3434

35-
if column.sql_type_metadata.sql_type == "character varying[]"
35+
if ["character varying[]", "text[]"].include?(column.sql_type_metadata.sql_type)
3636
type = Anchor::Types::Array.new(Anchor::Types::String)
3737
end
3838

0 commit comments

Comments
 (0)