aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWijnand Wiersma <wijnand@videre.net>2010-05-16 14:49:40 +0200
committerJosé Valim <jose.valim@gmail.com>2010-05-16 15:15:43 +0200
commitd7a3e65c50c5e8c0a7a37a59d6244c0e91fda629 (patch)
tree5fd969c3d517d005902f165422b18bb33a7d673c
parentf58bdae1f716c71202546c5a40a951b5fc54a591 (diff)
downloadrails-d7a3e65c50c5e8c0a7a37a59d6244c0e91fda629.tar.gz
rails-d7a3e65c50c5e8c0a7a37a59d6244c0e91fda629.tar.bz2
rails-d7a3e65c50c5e8c0a7a37a59d6244c0e91fda629.zip
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: José Valim <jose.valim@gmail.com>
-rw-r--r--activerecord/test/cases/migration_test.rb16
1 files changed, 9 insertions, 7 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb
index 41e27bd281..768a44f6df 100644
--- a/activerecord/test/cases/migration_test.rb
+++ b/activerecord/test/cases/migration_test.rb
@@ -860,13 +860,15 @@ if ActiveRecord::Base.connection.supports_migrations?
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