Skip to content

Commit

Permalink
fix: delete expense_attributes_deletion_cache in workspace reset (#685
Browse files Browse the repository at this point in the history
)
  • Loading branch information
1 parent 0e5c6cd commit 4957f68
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/sql/functions/reset-workspace.sql
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,12 @@ BEGIN
-- GET DIAGNOSTICS rcount = ROW_COUNT;
-- RAISE NOTICE 'Deleted % workspaces', 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;

UPDATE workspaces
SET last_synced_at = null, ns_account_id = ''
WHERE id = _workspace_id;
Expand Down

0 comments on commit 4957f68

Please sign in to comment.