提交 d7a3e65c 编写于 作者: W Wijnand Wiersma 提交者: José Valim

Postgresql doesn't allow to change a string type column to a binary type. Skip...

Postgresql doesn't allow to change a string type column to a binary type. Skip this test for postgresql for now. [#4616 state:resolved]
Signed-off-by: NJosé Valim <jose.valim@gmail.com>
上级 f58bdae1
......@@ -860,13 +860,15 @@ def test_change_column_default
assert_equal "Tester", Person.new.first_name
end
def test_change_column_type_default_should_change
old_columns = Person.connection.columns(Person.table_name, "#{name} Columns")
assert !old_columns.find { |c| c.name == 'data' }
assert_nothing_raised do
Person.connection.add_column "people", "data", :string, :default => ''
Person.connection.change_column "people", "data", :binary
unless current_adapter?(:PostgreSQLAdapter)
def test_change_column_type_default_should_change
old_columns = Person.connection.columns(Person.table_name, "#{name} Columns")
assert !old_columns.find { |c| c.name == 'data' }
assert_nothing_raised do
Person.connection.add_column "people", "data", :string, :default => ''
Person.connection.change_column "people", "data", :binary
end
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册