Fix type update for foreign key restrictions