Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Member groups are not always deleted along with their associated stoolball entity #602

Open
sussexrick opened this issue May 13, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@sussexrick
Copy link
Member

sussexrick commented May 13, 2022

Queries to find the orphaned groups and whether they have any members in them:

SELECT n.id, n.text, m2m.*,c.ClubRoute
FROM UmbracoNode n LEFT JOIN cmsMember2MemberGroup m2m ON n.id = m2m.MemberGroup 
LEFT JOIN StoolballClub c ON n.uniqueId = c.MemberGroupKey 
WHERE n.nodeObjectType IN ('366E63B9-880F-4E13-A61C-98069B029728') and n.text LIKE 'club/%'
AND c.ClubRoute IS NULL

SELECT n.id, n.text, m2m.*, t.TeamRoute
FROM UmbracoNode n LEFT JOIN cmsMember2MemberGroup m2m ON n.id = m2m.MemberGroup
LEFT JOIN StoolballTeam t ON n.uniqueId = t.MemberGroupKey 
WHERE n.nodeObjectType IN ('366E63B9-880F-4E13-A61C-98069B029728') and n.text LIKE 'team/%'
AND t.TeamRoute IS NULL

SELECT n.id,n.text, m2m.*, t.TeamRoute
FROM UmbracoNode n LEFT JOIN cmsMember2MemberGroup m2m ON n.id = m2m.MemberGroup
LEFT JOIN StoolballTeam t ON n.uniqueId = t.MemberGroupKey 
WHERE n.nodeObjectType IN ('366E63B9-880F-4E13-A61C-98069B029728') and n.text LIKE 'Team owner:%'
AND t.TeamRoute IS NULL

SELECT n.id,n.text, m2m.*, c.CompetitionRoute
FROM UmbracoNode n LEFT JOIN cmsMember2MemberGroup m2m ON n.id = m2m.MemberGroup
LEFT JOIN StoolballCompetition c ON n.uniqueId = c.MemberGroupKey 
WHERE n.nodeObjectType IN ('366E63B9-880F-4E13-A61C-98069B029728') and n.text LIKE 'competition/%'
AND c.CompetitionRoute IS NULL

SELECT n.id,n.text, m2m.*, ml.MatchLocationRoute
FROM UmbracoNode n LEFT JOIN cmsMember2MemberGroup m2m ON n.id = m2m.MemberGroup
LEFT JOIN StoolballMatchLocation ml ON n.uniqueId = ml.MemberGroupKey 
WHERE n.nodeObjectType IN ('366E63B9-880F-4E13-A61C-98069B029728') and n.text LIKE 'location/%'
AND ml.MatchLocationRoute IS NULL

SELECT n.id,n.text, m2m.*, s.SchoolRoute
FROM UmbracoNode n LEFT JOIN cmsMember2MemberGroup m2m ON n.id = m2m.MemberGroup
LEFT JOIN StoolballSchool s ON n.uniqueId = s.MemberGroupKey 
WHERE n.nodeObjectType IN ('366E63B9-880F-4E13-A61C-98069B029728') and n.text LIKE 'school/%'
AND s.SchoolRoute IS NULL
@sussexrick sussexrick added the bug Something isn't working label May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant