rails/rails — pull request #5522 by travisjeffery (2012-03-20 07:08:00+00:00)
Title: Fix adding/removing field's index when generating migration

When trying to generate a migration that removes a field with an index,
the up migration will remove both the field and the index, and the down
will re-add both the field and the index.

Also improved the indentation formatting of the generated migration.

I believe this functionality is not tested, but if I missed something let me
know and I will add the tests.

Thanks,

Travis