aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-02-23 19:31:51 -0800
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-02-23 19:31:51 -0800
commitfb40358f4f3d0028bbcd1a8f1fc74b1453e2014a (patch)
treefb45a241b3afe883efbceb4f1cd72997c6cb7f38 /activerecord/test
parentda5ca962aff0e6b0d2afb44c79921af590e3d249 (diff)
parent6fad6b5e5c3bbaf23f577b2fdccf4b123dff726e (diff)
downloadrails-fb40358f4f3d0028bbcd1a8f1fc74b1453e2014a.tar.gz
rails-fb40358f4f3d0028bbcd1a8f1fc74b1453e2014a.tar.bz2
rails-fb40358f4f3d0028bbcd1a8f1fc74b1453e2014a.zip
Merge pull request #9395 from yahonda/oracle_index_length
Address failure test_rename_column_with_multi_column_index with Oracle
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/migration/columns_test.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/activerecord/test/cases/migration/columns_test.rb b/activerecord/test/cases/migration/columns_test.rb
index 0c7ad8add4..e52809f0f8 100644
--- a/activerecord/test/cases/migration/columns_test.rb
+++ b/activerecord/test/cases/migration/columns_test.rb
@@ -96,10 +96,18 @@ module ActiveRecord
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