From c74f2029ceac20422c413b2ff695b31a16ca0c7d Mon Sep 17 00:00:00 2001 From: Viswas Date: Fri, 13 Dec 2024 11:55:26 +0530 Subject: [PATCH] fix: delete `expense_attributes_deletion_cache` while workspace reset --- 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