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/lib/active_record | |
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/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/migration/command_recorder.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/migration/command_recorder.rb b/activerecord/lib/active_record/migration/command_recorder.rb index a3a5e0fa16..ac7d506fd1 100644 --- a/activerecord/lib/active_record/migration/command_recorder.rb +++ b/activerecord/lib/active_record/migration/command_recorder.rb @@ -161,8 +161,8 @@ module ActiveRecord table, columns, options = *args options ||= {} - index_name = options[:name] - options_hash = index_name ? { name: index_name } : { column: columns } + options_hash = options.slice(:name, :algorithm) + options_hash[:column] = columns if !options_hash[:name] [:remove_index, [table, options_hash]] end |