diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2010-05-09 12:42:48 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-05-09 12:42:48 +0100 |
commit | 8d2f6c16e381f5fff6d3f24f5c73a443577a1488 (patch) | |
tree | c79dbfcd8945652f7bf746c05043acf537affbd0 /activerecord/test/cases/migration_test.rb | |
parent | f75a6fec2947ce23bd3ca4911d2d798415ccd355 (diff) | |
download | rails-8d2f6c16e381f5fff6d3f24f5c73a443577a1488.tar.gz rails-8d2f6c16e381f5fff6d3f24f5c73a443577a1488.tar.bz2 rails-8d2f6c16e381f5fff6d3f24f5c73a443577a1488.zip |
Revert "Revert "Add index length support for MySQL [#1852 state:open]""
This reverts commit 6626833db13a69786f9f6cd56b9f53c4017c3e39.
Diffstat (limited to 'activerecord/test/cases/migration_test.rb')
-rw-r--r-- | activerecord/test/cases/migration_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb index a3d1ceaa1f..f67344445a 100644 --- a/activerecord/test/cases/migration_test.rb +++ b/activerecord/test/cases/migration_test.rb @@ -92,6 +92,14 @@ if ActiveRecord::Base.connection.supports_migrations? 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"]) } + assert_nothing_raised { Person.connection.add_index("people", ["last_name"], :length => 10) } + assert_nothing_raised { Person.connection.remove_index("people", "last_name") } + assert_nothing_raised { Person.connection.add_index("people", ["last_name"], :length => {:last_name => 10}) } + assert_nothing_raised { Person.connection.remove_index("people", ["last_name"]) } + assert_nothing_raised { Person.connection.add_index("people", ["last_name", "first_name"], :length => 10) } + assert_nothing_raised { Person.connection.remove_index("people", ["last_name", "first_name"]) } + assert_nothing_raised { Person.connection.add_index("people", ["last_name", "first_name"], :length => {:last_name => 10, :first_name => 20}) } + assert_nothing_raised { Person.connection.remove_index("people", ["last_name", "first_name"]) } end # quoting |