Skip to content

Commit 5b2a7dc

Browse files
author
Alain Van Driessche
committed
Faster Process by removing useless deletions
1 parent eabd49e commit 5b2a7dc

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

app/Jobs/ProcessUserDeletion.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,6 @@ public function handle()
4444
Event::where('approved_by', $this->userId)
4545
->update(['approved_by' => $this->legacyUserId]);
4646

47-
// Update participations
48-
Participation::where('user_id', $this->userId)
49-
->update(['user_id' => $this->legacyUserId]);
50-
51-
// Update excellences
52-
Excellence::where('user_id', $this->userId)
53-
->update(['user_id' => $this->legacyUserId]);
54-
55-
// Update model_has_roles table directly
56-
DB::table('model_has_roles')
57-
->where('model_id', $this->userId)
58-
->where('model_type', User::class)
59-
->update(['model_id' => $this->legacyUserId]);
60-
61-
// Update leading_teacher_expertise_user table directly
62-
DB::table('leading_teacher_expertise_user')
63-
->where('user_id', $this->userId)
64-
->update(['user_id' => $this->legacyUserId]);
65-
6647
// Hard delete the user
6748
User::where('id', $this->userId)->delete();
6849

0 commit comments

Comments
 (0)