I am writing a migration generator for a plugin I am writing and I need to to be able to find what unique indexes a table has so I can modify existing unique indexes to become a
If you just want to see all the indexes for a particular table you can do:
ActiveRecord::Base.connection.indexes('my_table_name').map(&:name)