diff options
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/migration/command_recorder.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/migration/command_recorder.rb b/activerecord/lib/active_record/migration/command_recorder.rb index 5f4dd798a7..5923993229 100644 --- a/activerecord/lib/active_record/migration/command_recorder.rb +++ b/activerecord/lib/active_record/migration/command_recorder.rb @@ -81,10 +81,11 @@ module ActiveRecord def invert_add_index(args) table, columns, options = *args if options && options[:name] - [:remove_index, [table, {:name => options[:name]}]] + options_hash = {:name => options[:name]} else - [:remove_index, [table, {:column => columns}]] + options_hash = {:column => columns} end + [:remove_index, [table, options_hash]] end def invert_remove_timestamps(args) |