Permalink
Browse files

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

…ype. Skip this test for postgresql for now. [#4616 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
Wijnand authored and josevalim committed May 16, 2010
1 parent f58bdae commit d7a3e65c50c5e8c0a7a37a59d6244c0e91fda629
Showing with 9 additions and 7 deletions.
  1. +9 −7 activerecord/test/cases/migration_test.rb
@@ -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

0 comments on commit d7a3e65

Please sign in to comment.