From a077bd5710f6d4828acd1f2b88c1da3eefccda5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=84=B1?= Date: Fri, 13 Mar 2026 00:30:35 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[user]=20forceDeleteUser=EC=97=90=20tena?= =?UTF-8?q?nt=5Fuser=5Fprofiles=20=EC=82=AD=EC=A0=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 영구삭제 시 orphan tenant_user_profiles 방지 --- app/Services/UserService.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Services/UserService.php b/app/Services/UserService.php index bc0fdad4..73bc52be 100644 --- a/app/Services/UserService.php +++ b/app/Services/UserService.php @@ -386,6 +386,7 @@ public function forceDeleteUser(int $id): bool // 2. 피벗/소유 테이블 삭제 $user->tenants()->detach(); + DB::table('tenant_user_profiles')->where('user_id', $user->id)->delete(); DB::table('user_roles')->where('user_id', $user->id)->delete(); DB::table('department_user')->where('user_id', $user->id)->delete(); DB::connection('codebridge')->table('sales_partners')->where('user_id', $user->id)->delete();