diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-09-21 19:20:23 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-21 19:20:23 +0900 |
commit | 30ae39efc22c3eae10260c0a3bde5cd0d2553f2f (patch) | |
tree | 146d208ddccd82bc811c7878bbdc9d5c192e0505 /activerecord/test | |
parent | e0f4ccabb83a681397f98f216f5c1f65a5969bbe (diff) | |
parent | 611f2b2911197946bd81d5d5fb017e7133d77d2f (diff) | |
download | rails-30ae39efc22c3eae10260c0a3bde5cd0d2553f2f.tar.gz rails-30ae39efc22c3eae10260c0a3bde5cd0d2553f2f.tar.bz2 rails-30ae39efc22c3eae10260c0a3bde5cd0d2553f2f.zip |
Merge pull request #24199 from meinac/fix_invert_add_index
Use algorithm while removing index with db:rollback
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 |