Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Diel
Stud.IP
Commits
df66ea02
Commit
df66ea02
authored
2 years ago
by
Jan-Hendrik Willms
Committed by
Jan-Hendrik Willms
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
remove course notifications as well when deleting user and cleanup table via migration, fixes #2141
Closes #2141 Merge request
studip/studip!1389
parent
9c9a398d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
db/migrations/5.1.41_cleanup_seminar_user_notifications.php
+21
-0
21 additions, 0 deletions
db/migrations/5.1.41_cleanup_seminar_user_notifications.php
with
21 additions
and
0 deletions
db/migrations/5.1.41_cleanup_seminar_user_notifications.php
0 → 100644
+
21
−
0
View file @
df66ea02
<?php
/**
* @see https://gitlab.studip.de/studip/studip/-/issues/2141
*/
final
class
CleanupSeminarUserNotifications
extends
Migration
{
public
function
description
()
{
return
"Removes all entries from `seminar_user_notifications` that are not in `seminar_user` as well"
;
}
protected
function
up
()
{
$query
=
"DELETE `seminar_user_notifications`
FROM `seminar_user_notifications`
LEFT JOIN `seminar_user` USING(`user_id`, `Seminar_id`)
WHERE `seminar_user`.`user_id` IS NULL"
;
DBManager
::
get
()
->
exec
(
$query
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment