Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

test, reset changed state in PG's uuid tests.

This resulted in some unrelated errors on Traivs:

  1) Error:
PostgresqlUUIDTest#test_treat_blank_uuid_as_nil:
ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column "thingy" of relation "uuid_data_type" does not exist
LINE 1: INSERT INTO "uuid_data_type" ("thingy") VALUES ($1) RETURNIN...
                                      ^
: INSERT INTO "uuid_data_type" ("thingy") VALUES ($1) RETURNING "id"

/cc @zuhao
  • Loading branch information...
commit 7f1fd0265cb11544ae7cc94fb417c6abddcf2ee3 1 parent 71e8adc
Yves Senn senny authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 activerecord/test/cases/adapters/postgresql/uuid_test.rb
6 activerecord/test/cases/adapters/postgresql/uuid_test.rb
View
@@ -45,12 +45,14 @@ def test_change_column_default
UUIDType.reset_column_information
column = UUIDType.columns.find { |c| c.name == 'thingy' }
assert_equal "uuid_generate_v1()", column.default_function
-
+
@connection.change_column :uuid_data_type, :thingy, :uuid, null: false, default: "uuid_generate_v4()"
-
+
UUIDType.reset_column_information
column = UUIDType.columns.find { |c| c.name == 'thingy' }
assert_equal "uuid_generate_v4()", column.default_function
+ ensure
+ UUIDType.reset_column_information
end
def test_data_type_of_uuid_types
Please sign in to comment.
Something went wrong with that request. Please try again.