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