diff options
author | Marc Schütz <schuetzm@gmx.net> | 2014-02-20 18:54:13 +0100 |
---|---|---|
committer | Marc Schütz <schuetzm@gmx.net> | 2014-05-18 11:26:41 +0200 |
commit | 9a0d35e820464f872b0340366dded639f00e19b9 (patch) | |
tree | b57b136af361bbba1ec411d75cdb0784caed86b9 /activerecord/test/cases | |
parent | dbbcc8388acbcded4ef3a8b17213e3f16a354f32 (diff) | |
download | rails-9a0d35e820464f872b0340366dded639f00e19b9.tar.gz rails-9a0d35e820464f872b0340366dded639f00e19b9.tar.bz2 rails-9a0d35e820464f872b0340366dded639f00e19b9.zip |
Make `:index` in migrations work with all column types
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/migration/columns_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/activerecord/test/cases/migration/columns_test.rb b/activerecord/test/cases/migration/columns_test.rb index 2d7a7ec73a..a7c287515d 100644 --- a/activerecord/test/cases/migration/columns_test.rb +++ b/activerecord/test/cases/migration/columns_test.rb @@ -274,6 +274,16 @@ module ActiveRecord ensure connection.drop_table(:my_table) rescue nil end + + def test_column_with_index + connection.create_table "my_table", force: true do |t| + t.string :item_number, index: true + end + + assert connection.index_exists?("my_table", :item_number, name: :index_my_table_on_item_number) + ensure + connection.drop_table(:my_table) rescue nil + end end end end |