From 1911088105fdd09575fb6b2731f48f485bb9668c Mon Sep 17 00:00:00 2001 From: Viswas Haridas <37623357+JustARatherRidiculouslyLongUsername@users.noreply.github.com> Date: Sat, 14 Dec 2024 00:48:16 +0530 Subject: [PATCH] fix: delete `expense_attributes_deletion_cache` while workspace reset (#232) --- scripts/sql/reset_db.sql | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/sql/reset_db.sql b/scripts/sql/reset_db.sql index 7d02a16..f58112e 100644 --- a/scripts/sql/reset_db.sql +++ b/scripts/sql/reset_db.sql @@ -195,6 +195,13 @@ BEGIN GET DIAGNOSTICS rcount = ROW_COUNT; RAISE NOTICE 'Deleted % users', 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; + + _org_id := (SELECT org_id FROM workspaces WHERE id = _workspace_id); DELETE