What's the correct syntax for remove_index in a Rails 3.1.0 migration?

后端 未结 6 909
清歌不尽
清歌不尽 2021-02-01 00:30

I\'m in the process of adding Devise to an existing Rails app, with a Users table already defined. The devise generator pushed out the following migration:

class         


        
6条回答
  •  逝去的感伤
    2021-02-01 01:12

    For the record, the way to remove an index by name is

    remove_index(:table_name, :name => 'index_name')
    

    so in your case

    remove_index(:users, :name => 'index_users_on_email')
    

提交回复
热议问题