Browse files

Merge pull request #9395 from yahonda/oracle_index_length

Address failure test_rename_column_with_multi_column_index with Oracle
  • Loading branch information...
2 parents da5ca96 + 6fad6b5 commit fb40358f4f3d0028bbcd1a8f1fc74b1453e2014a @carlosantoniodasilva carlosantoniodasilva committed Feb 23, 2013
Showing with 10 additions and 2 deletions.
  1. +10 −2 activerecord/test/cases/migration/columns_test.rb
View
12 activerecord/test/cases/migration/columns_test.rb
@@ -96,10 +96,18 @@ def test_rename_column_with_multi_column_index
add_index "test_models", ["hat_style", "hat_size"], unique: true
rename_column "test_models", "hat_size", 'size'
- assert_equal ['index_test_models_on_hat_style_and_size'], connection.indexes('test_models').map(&:name)
+ if current_adapter? :OracleAdapter
+ assert_equal ['i_test_models_hat_style_size'], connection.indexes('test_models').map(&:name)
+ else
+ assert_equal ['index_test_models_on_hat_style_and_size'], connection.indexes('test_models').map(&:name)
+ end
rename_column "test_models", "hat_style", 'style'
- assert_equal ['index_test_models_on_style_and_size'], connection.indexes('test_models').map(&:name)
+ if current_adapter? :OracleAdapter
+ assert_equal ['i_test_models_style_size'], connection.indexes('test_models').map(&:name)
+ else
+ assert_equal ['index_test_models_on_style_and_size'], connection.indexes('test_models').map(&:name)
+ end
end
def test_rename_column_does_not_rename_custom_named_index

0 comments on commit fb40358

Please sign in to comment.