From 962ac50b8b8c95baff77a3781c375186e6e00176 Mon Sep 17 00:00:00 2001 From: Viswas Date: Fri, 13 Dec 2024 12:56:23 +0530 Subject: [PATCH] fix: delete `expense_attributes_deletion_cache` in workspace reset --- sql/functions/reset-workspace.sql | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sql/functions/reset-workspace.sql b/sql/functions/reset-workspace.sql index 58586733..4eda9f06 100644 --- a/sql/functions/reset-workspace.sql +++ b/sql/functions/reset-workspace.sql @@ -240,6 +240,12 @@ BEGIN GET DIAGNOSTICS rcount = ROW_COUNT; RAISE NOTICE 'Deleted % django_q_schedule', rcount; + DELETE + FROM expense_attributes_deletion_cache + WHERE workspace_id = _workspace_id; + GET DIAGNOSTICS rcount = ROW_COUNT; + RAISE NOTICE 'Deleted % expense_attributes_deletion_cache', rcount; + -- DELETE -- FROM auth_tokens aut -- WHERE aut.user_id IN (