Fix diagram profiles to work with latest DB changes