Skip to content
This repository
Browse code

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 Wiersma authored May 16, 2010 josevalim committed May 16, 2010
16  activerecord/test/cases/migration_test.rb
@@ -823,13 +823,15 @@ def test_change_column_default
823 823
       assert_equal "Tester", Person.new.first_name
824 824
     end
825 825
 
826  
-    def test_change_column_type_default_should_change
827  
-      old_columns = Person.connection.columns(Person.table_name, "#{name} Columns")
828  
-      assert !old_columns.find { |c| c.name == 'data' }
829  
-
830  
-      assert_nothing_raised do
831  
-        Person.connection.add_column "people", "data", :string, :default => ''
832  
-        Person.connection.change_column "people", "data", :binary
  826
+    unless current_adapter?(:PostgreSQLAdapter)
  827
+      def test_change_column_type_default_should_change
  828
+        old_columns = Person.connection.columns(Person.table_name, "#{name} Columns")
  829
+        assert !old_columns.find { |c| c.name == 'data' }
  830
+
  831
+        assert_nothing_raised do
  832
+          Person.connection.add_column "people", "data", :string, :default => ''
  833
+          Person.connection.change_column "people", "data", :binary
  834
+        end
833 835
       end
834 836
     end
835 837
 

0 notes on commit 5b1f4c5

Please sign in to comment.
Something went wrong with that request. Please try again.