@@ -43,20 +43,20 @@ def test_uuid_column_default
4343 column = UUIDType . columns_hash [ "thingy" ]
4444 assert_equal "gen_random_uuid()" , column . default_function
4545 end
46- else
47- def test_change_column_default
48- connection . add_column :uuid_data_type , :thingy , :uuid , null : false , default : "uuid_generate_v1()"
49- UUIDType . reset_column_information
50- column = UUIDType . columns_hash [ "thingy" ]
51- assert_equal "uuid_generate_v1()" , column . default_function
46+ end
5247
53- connection . change_column :uuid_data_type , :thingy , :uuid , null : false , default : "uuid_generate_v4()"
54- UUIDType . reset_column_information
55- column = UUIDType . columns_hash [ "thingy" ]
56- assert_equal "uuid_generate_v4()" , column . default_function
57- ensure
58- UUIDType . reset_column_information
59- end
48+ def test_change_column_default
49+ connection . add_column :uuid_data_type , :thingy , :uuid , null : false , default : "uuid_generate_v1()"
50+ UUIDType . reset_column_information
51+ column = UUIDType . columns_hash [ "thingy" ]
52+ assert_equal "uuid_generate_v1()" , column . default_function
53+
54+ connection . change_column :uuid_data_type , :thingy , :uuid , null : false , default : "uuid_generate_v4()"
55+ UUIDType . reset_column_information
56+ column = UUIDType . columns_hash [ "thingy" ]
57+ assert_equal "uuid_generate_v4()" , column . default_function
58+ ensure
59+ UUIDType . reset_column_information
6060 end
6161
6262 def test_data_type_of_uuid_types
0 commit comments