diff options
author | Wijnand Wiersma <wijnand@videre.net> | 2010-05-16 14:49:40 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-05-16 15:15:43 +0200 |
commit | d7a3e65c50c5e8c0a7a37a59d6244c0e91fda629 (patch) | |
tree | 5fd969c3d517d005902f165422b18bb33a7d673c /activerecord/test/cases/migration_test.rb | |
parent | f58bdae1f716c71202546c5a40a951b5fc54a591 (diff) | |
download | rails-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>
Diffstat (limited to 'activerecord/test/cases/migration_test.rb')
-rw-r--r-- | activerecord/test/cases/migration_test.rb | 16 |
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 |