Fix orphaned notification settings
What does this MR do?
Removes any NotificationSettings
that remained after their parent namespace was deleted.
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/29688
-
Changelog entry added, if necessary - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
Merge request reports
Activity
marked the checklist item Changelog entry added, if necessary as completed
marked the checklist item Conform by the merge request performance guides as completed
marked the checklist item Conform by the style guides as completed
On staging, the migration took ~3 seconds.
== 20170418103908 DeleteOrphanNotificationSettings: migrated (3.1813s) ========
> NotificationSetting.for_groups.joins('LEFT OUTER JOIN namespaces ON namespaces.id=notification_settings.source_id').where('namespaces.id is null').count => 0
@dbalexandre can you review this one? Thanks!
assigned to @dbalexandre
- Resolved by James Lopez
- Resolved by James Lopez
- Resolved by James Lopez
- Resolved by James Lopez
@yorickpeterse Can you have a look, please?
assigned to @yorickpeterse
- Resolved by James Lopez
- Resolved by James Lopez
assigned to @jameslopez
added 2 commits
@yorickpeterse @dbalexandre updated the MR. Thanks!
assigned to @yorickpeterse
changed milestone to %9.1
mentioned in commit a9da3743
marked the checklist item Squashed related commits together as completed
This needs to go on both
9.1
and9.0
/cc @godfat @felipe_artur @twk3mentioned in issue #31059 (closed)
changed milestone to %9.0
mentioned in commit 6bec04ad
mentioned in commit 930e8c03