update relational foreign keys