What I need is a migration to apply unique constraint to a combination of columns. i.e. for a people table, a combination of first_name, last_Name and Dob should be unique.
people
first_name
last_Name
Dob
add_index :people, [:firstname, :lastname, :dob], :unique => true
1.4m articles
1.4m replys
5 comments
57.0k users