Skip to content

Commit

Permalink
Postgresql doesn't allow to change a string type column to a binary t…
Browse files Browse the repository at this point in the history
…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 d7a3e65
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions activerecord/test/cases/migration_test.rb
Expand Up @@ -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

Expand Down

0 comments on commit d7a3e65

Please sign in to comment.