Skip to content

Commit

Permalink
delete last export details in reset workspace function (#469)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashutosh619-sudo authored Nov 30, 2023
1 parent bfd3e93 commit ca5348d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/sql/functions/delete-workspace.sql
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,12 @@ BEGIN
GET DIAGNOSTICS rcount = ROW_COUNT;
RAISE NOTICE 'Deleted % workspace_schedules', rcount;

DELETE
FROM last_export_details led
WHERE led.workspace_id = _workspace_id;
GET DIAGNOSTICS rcount = ROW_COUNT;
RAISE NOTICE 'Deleted % last_export_details', rcount;

DELETE
FROM django_q_schedule dqs
WHERE dqs.args = _workspace_id::varchar(255);
Expand Down Expand Up @@ -267,4 +273,4 @@ BEGIN

RETURN;
END
$$ LANGUAGE plpgsql;
$$ LANGUAGE plpgsql;

0 comments on commit ca5348d

Please sign in to comment.