RoR doesn’t support foreign keys in DB migrations.This gem(http://t.co/hjBJ4lA4) adds foreign keys support in DB migrations. #ROR #GEM — Akhil Bansal (@bansalakhil) August 21, 2012

Read more at the source