From 79542f8d0b1008428da3cd9c5136769fc70334af Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 15 Aug 2006 23:05:01 +0000 Subject: Migrations: uniquely name multicolumn indexes so you don't have to. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4767 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/migration_test.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'activerecord/test') diff --git a/activerecord/test/migration_test.rb b/activerecord/test/migration_test.rb index 649ee54439..b0cb34d938 100644 --- a/activerecord/test/migration_test.rb +++ b/activerecord/test/migration_test.rb @@ -58,7 +58,13 @@ if ActiveRecord::Base.connection.supports_migrations? 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", "last_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"]) } # quoting # Note: changed index name from "key" to "key_idx" since "key" is a Firebird reserved word -- cgit v1.2.3