Added foreign constraints to DB.