Skip to content

Commit d46dd18

Browse files
committed
[postgres] bit types are not longer reported as :string column types by AR 4.2
1 parent 7c441c0 commit d46dd18

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

test/db/postgresql/types_test.rb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,15 @@ def test_data_type_of_network_address_types
290290
end if ar_version('4.0')
291291

292292
def test_data_type_of_bit_string_types
293-
assert_equal :string, @first_bit_string.column_for_attribute(:bit_string).type
294-
assert_equal :string, @first_bit_string.column_for_attribute(:bit_string_varying).type
293+
bit_column = @first_bit_string.column_for_attribute(:bit_string)
294+
bit_varying_column = @first_bit_string.column_for_attribute(:bit_string_varying)
295+
if ar_version('4.2')
296+
assert_equal :bit, bit_column.type
297+
assert_equal :bit_varying, bit_varying_column.type
298+
else
299+
assert_equal :string, bit_column.type
300+
assert_equal :string, bit_varying_column.type
301+
end
295302
end
296303

297304
def test_data_type_of_oid_types

0 commit comments

Comments
 (0)