diff options
author | Mehmet Emin İNAÇ <mehmetemininac@gmail.com> | 2016-03-15 03:01:09 +0200 |
---|---|---|
committer | Mehmet Emin INAC <mehmetemininac@gmail.com> | 2017-09-21 11:06:21 +0200 |
commit | 611f2b2911197946bd81d5d5fb017e7133d77d2f (patch) | |
tree | fed20351120f93bbd67fa858c8f181286af44cdf /activerecord/test | |
parent | 6c199967fc5c32155684b95628751eb1b5098e13 (diff) | |
download | rails-611f2b2911197946bd81d5d5fb017e7133d77d2f.tar.gz rails-611f2b2911197946bd81d5d5fb017e7133d77d2f.tar.bz2 rails-611f2b2911197946bd81d5d5fb017e7133d77d2f.zip |
Use algorithm while removing index with db:rollback
Closes #24190
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/migration/command_recorder_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/migration/command_recorder_test.rb b/activerecord/test/cases/migration/command_recorder_test.rb index 0b5e983f14..58bc558619 100644 --- a/activerecord/test/cases/migration/command_recorder_test.rb +++ b/activerecord/test/cases/migration/command_recorder_test.rb @@ -213,6 +213,11 @@ module ActiveRecord assert_equal [:remove_index, [:table, { name: "new_index" }]], remove end + def test_invert_add_index_with_algorithm_option + remove = @recorder.inverse_of :add_index, [:table, :one, algorithm: :concurrently] + assert_equal [:remove_index, [:table, { column: :one, algorithm: :concurrently }]], remove + end + def test_invert_remove_index add = @recorder.inverse_of :remove_index, [:table, :one] assert_equal [:add_index, [:table, :one]], add |