Removing a MySQL index using a ruby on rails migration

I ran into a bit of a problem with the standard documentation regarding the removal of an index by way of a ruby on rails migration… at least with some of the old data living out on the web.

My initial searches produced an incorrect method:

remove_index :table_name, :named_index

The correct method is:

remove_index :table_name, :name => “named_index”

Which can actually be found on the updated documentation.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>