解决方法
Rails 3
不,您需要自己处理索引,因为索引基于表名.例如:
remove_index :old_table_name,:column_name rename_table :old_table_name,:new_table_name add_index :new_table_name,:column_name
轨道4
In Rails 4.0 when a column or a table is renamed the related indexes are also renamed. If you have migrations which rename the indexes,they are no longer needed.