diff options
-rw-r--r-- | activerecord/lib/active_record/migration/command_recorder.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/migration/command_recorder.rb b/activerecord/lib/active_record/migration/command_recorder.rb index 25b8649350..032ce3aad8 100644 --- a/activerecord/lib/active_record/migration/command_recorder.rb +++ b/activerecord/lib/active_record/migration/command_recorder.rb @@ -43,6 +43,11 @@ module ActiveRecord def invert_rename_column(args) [:rename_column, [args.first] + args.last(2).reverse] end + + def invert_add_index(args) + table, columns, _ = *args + [:remove_index, [table, {:column => columns}]] + end end end end |