diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-08-15 23:05:01 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-08-15 23:05:01 +0000 |
commit | 79542f8d0b1008428da3cd9c5136769fc70334af (patch) | |
tree | 9ec553a1ebb8b5d81f162ebd1896f9a5e3c5ffc6 /activerecord/test/migration_test.rb | |
parent | 6457b365a1a63018665dfbb4cb365d85be9dd771 (diff) | |
download | rails-79542f8d0b1008428da3cd9c5136769fc70334af.tar.gz rails-79542f8d0b1008428da3cd9c5136769fc70334af.tar.bz2 rails-79542f8d0b1008428da3cd9c5136769fc70334af.zip |
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
Diffstat (limited to 'activerecord/test/migration_test.rb')
-rw-r--r-- | activerecord/test/migration_test.rb | 8 |
1 files changed, 7 insertions, 1 deletions
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 |