Follow-up from "Resolve "Remove ghost notification settings for groups and projects""
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
The following discussion from gitlab-ce!20567 should be addressed:
-
@smcgivern started a discussion: (+10 comments) @jacopo-beschi do we actually need this update for the foreign key to be added, or just to clean up 'other' ghost settings?
If it's the latter, I wonder if we should split this into two migrations.
Both queries here time out, unfortunately (the initial one to get the first batch). I'll take a look tomorrow and see if we can use something like https://docs.gitlab.com/ce/development/sql.html#use-where-exists-instead-of-where-in to improve that.
We need to remove notification_settings with orphan members.
In order to do that we could use a background migration: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20567#note_90488756