Closed romilrobtsenkov closed 6 years ago
Updated sql
SELECT project_user.user_id, groups.project_id, group_user.group_id, group_user.user_id FROM group_user RIGHT JOIN groups ON group_user.group_id = groups.id LEFT JOIN project_user ON project_user.user_id = group_user.user_id AND project_user.project_id = groups.project_id WHERE project_user.user_id IS NULL AND group_user.user_id IS NOT NULL
Found members in groups but not in project with:
SELECT groups.project_id, project_user.user_id, group_id, group_user.user_id FROM groups LEFT JOIN group_user ON group_user.group_id = groups.id LEFT JOIN project_user ON project_user.user_id = group_user.user_id WHERE project_user.user_id IS NULL
and manually deleted them