How can I add unique: true constraint to already existing index in Rails database?
unique: true
I tried to migrate by
def change add_index :editabi
Faster way using add_index_options:
def change add_index_options :editabilities, [:user_id, :list_id], unique: true end