I figured this mus happen to be clarified before, however i did not find any pointer from the searches. Might be I attempted with wrong key phrases.

Things I require is a migration to use unique constraint to a mix of posts.


for an individual table a mix of Firstname, LastName and Dob ought to be unique.

add_index :people, [:firstname, :lastname, :dob], :unique => true

Hi You might add unique index inside your migration towards the posts for instance

add_index(:accounts, [:branch_id, :party_id], :unique => true)

or separate unique indexes for every column