diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-10-01 10:39:03 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-10-01 10:39:03 +0900 |
commit | 322c5704e5ab8cc9bc3cfffecd3b06641d95f2b4 (patch) | |
tree | dd9faabfe6e89f64a1a7bbbf9dd1f2a0690e28f8 /activerecord/test | |
parent | 28ac0b30f24ce4d4da8a21da06d2f84ad4fce3bf (diff) | |
parent | 5e4c22dfbb6dad676f74ded50b8c2536834a46a7 (diff) | |
download | rails-322c5704e5ab8cc9bc3cfffecd3b06641d95f2b4.tar.gz rails-322c5704e5ab8cc9bc3cfffecd3b06641d95f2b4.tar.bz2 rails-322c5704e5ab8cc9bc3cfffecd3b06641d95f2b4.zip |
Merge pull request #23593 from meinac/add_index_option_for_change_table
index option added for change_table migrations
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/migration/change_table_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/cases/migration/change_table_test.rb b/activerecord/test/cases/migration/change_table_test.rb index 034bf32165..c108d372d1 100644 --- a/activerecord/test/cases/migration/change_table_test.rb +++ b/activerecord/test/cases/migration/change_table_test.rb @@ -164,6 +164,14 @@ module ActiveRecord end end + def test_column_creates_column_with_index + with_change_table do |t| + @connection.expect :add_column, nil, [:delete_me, :bar, :integer, {}] + @connection.expect :add_index, nil, [:delete_me, :bar, {}] + t.column :bar, :integer, index: true + end + end + def test_index_creates_index with_change_table do |t| @connection.expect :add_index, nil, [:delete_me, :bar, {}] |