aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/migration_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-08-15 23:51:27 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-08-15 23:51:27 +0000
commitbc7f2315ba89199bb24866ddb76ead4bbe6b71c9 (patch)
treec78b28a1bd03b1e7b34a6307171cfb59ca3cafc8 /activerecord/test/migration_test.rb
parent79542f8d0b1008428da3cd9c5136769fc70334af (diff)
downloadrails-bc7f2315ba89199bb24866ddb76ead4bbe6b71c9.tar.gz
rails-bc7f2315ba89199bb24866ddb76ead4bbe6b71c9.tar.bz2
rails-bc7f2315ba89199bb24866ddb76ead4bbe6b71c9.zip
Make indexed columns easy to extract from the index name. Oracle users should explicitly assign index names due to field length restrictions.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4768 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/migration_test.rb')
-rw-r--r--activerecord/test/migration_test.rb19
1 files changed, 11 insertions, 8 deletions
diff --git a/activerecord/test/migration_test.rb b/activerecord/test/migration_test.rb
index b0cb34d938..14ce95073b 100644
--- a/activerecord/test/migration_test.rb
+++ b/activerecord/test/migration_test.rb
@@ -57,14 +57,17 @@ if ActiveRecord::Base.connection.supports_migrations?
assert_nothing_raised { Person.connection.add_index("people", "last_name") }
assert_nothing_raised { Person.connection.remove_index("people", "last_name") }
- assert_nothing_raised { Person.connection.add_index("people", ["last_name", "first_name"]) }
- assert_nothing_raised { Person.connection.remove_index("people", :column => ["last_name", "first_name"]) }
- assert_nothing_raised { Person.connection.add_index("people", ["last_name", "first_name"]) }
- assert_nothing_raised { Person.connection.remove_index("people", :name => "people_last_name_first_name_index") }
- assert_nothing_raised { Person.connection.add_index("people", ["last_name", "first_name"]) }
- assert_nothing_raised { Person.connection.remove_index("people", "last_name_first_name") }
- assert_nothing_raised { Person.connection.add_index("people", ["last_name", "first_name"]) }
- assert_nothing_raised { Person.connection.remove_index("people", ["last_name", "first_name"]) }
+ # Orcl nds shrt indx nms.
+ unless current_adapter?(:OracleAdapter)
+ assert_nothing_raised { Person.connection.add_index("people", ["last_name", "first_name"]) }
+ assert_nothing_raised { Person.connection.remove_index("people", :column => ["last_name", "first_name"]) }
+ assert_nothing_raised { Person.connection.add_index("people", ["last_name", "first_name"]) }
+ assert_nothing_raised { Person.connection.remove_index("people", :name => "index_people_on_last_name_and_first_name") }
+ assert_nothing_raised { Person.connection.add_index("people", ["last_name", "first_name"]) }
+ assert_nothing_raised { Person.connection.remove_index("people", "last_name_and_first_name") }
+ assert_nothing_raised { Person.connection.add_index("people", ["last_name", "first_name"]) }
+ assert_nothing_raised { Person.connection.remove_index("people", ["last_name", "first_name"]) }
+ end
# quoting
# Note: changed index name from "key" to "key_idx" since "key" is a Firebird reserved word