Cascade when deleting files

This commit is contained in:
Reid 'arrdem' McKenzie 2023-07-08 17:48:24 -06:00
parent f1c5a39548
commit 97fba6cb85

View file

@ -43,7 +43,18 @@ WHERE
user_id = :uid user_id = :uid
; ;
-- name: delete-file! -- name: delete-file#
DELETE FROM jobs
WHERE
user_uid = :uid
AND file_id = :fid
;
DELETE FROM file_analysis
WHERE
file_id = :fid
;
DELETE FROM files DELETE FROM files
WHERE WHERE
user_id = :uid user_id = :uid