aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorYasuo Honda <yasuo.honda@gmail.com>2013-01-02 02:39:18 +0900
committerYasuo Honda <yasuo.honda@gmail.com>2013-01-02 07:04:37 +0900
commite7ff765e116600f85fd3bb68e6e9a5a5cbaef04d (patch)
treeb729b73b81a3f35e962e6272ef91f179aa81bdf2 /activerecord/test
parent5f638161f736fbc360e843d1edf8d550cbbc8b26 (diff)
downloadrails-e7ff765e116600f85fd3bb68e6e9a5a5cbaef04d.tar.gz
rails-e7ff765e116600f85fd3bb68e6e9a5a5cbaef04d.tar.bz2
rails-e7ff765e116600f85fd3bb68e6e9a5a5cbaef04d.zip
Address a failure test_remove_column_with_multi_column_index with Oracle database
Not only PostgreSQL, Oracle database adapter drops the multi-column index if any of the indexed columns dropped by remove_column.
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/migration/rename_column_test.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/test/cases/migration/rename_column_test.rb b/activerecord/test/cases/migration/rename_column_test.rb
index 866b2e334c..8f6918d06a 100644
--- a/activerecord/test/cases/migration/rename_column_test.rb
+++ b/activerecord/test/cases/migration/rename_column_test.rb
@@ -107,8 +107,9 @@ module ActiveRecord
assert_equal 1, connection.indexes('test_models').size
remove_column("test_models", "hat_size")
- # FIXME: should all adapters behave the same?
- if current_adapter?(:PostgreSQLAdapter)
+ # Every database and/or database adapter has their own behavior
+ # if it drops the multi-column index when any of the indexed columns dropped by remove_column.
+ if current_adapter?(:PostgreSQLAdapter, :OracleAdapter)
assert_equal [], connection.indexes('test_models').map(&:name)
else
assert_equal ['index_test_models_on_hat_style_and_hat_size'], connection.indexes('test_models').map(&:name)