[Feature Request] migration generator :unique option

The generator for unique indices seems inconsistent to me.

rails g migration add_unique_index_to_users name:uniq

produces:

add_index :users, :name, unique: true

This is more intuitive to me:

rails g migration add_unique_index_to_users name:unique

The generator could easily support both ‘uniq’ and ‘unique’ options, and I’d be happy to add the feature if it is desirable.

Thanks,

Bryan

Hey Bryan

I’m fine with supporting both uniq and unique in the generator. More so because the option is called unique.

Cheers,

– Yves