Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…ype. Skip this test for postgresql for now.

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
commit 5b1f4c51cea332e567b25dcb160cd1f983b46b43 1 parent ec017e1
@Wijnand Wijnand authored josevalim committed
Showing with 9 additions and 7 deletions.
  1. +9 −7 activerecord/test/cases/migration_test.rb
View
16 activerecord/test/cases/migration_test.rb
@@ -823,13 +823,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
Please sign in to comment.
Something went wrong with that request. Please try again.