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
Just in case you have multiple DBs and the proposed ActiveRecord::Base.connection.indexes(table).inspect doesn't work because it is pointing to other DBs. You can do this in your rails console.