Add a unique constraint and foreign keys
update gems, update ruby to 2.1.5