Cascade when deleting files

This commit is contained in:
Reid 'arrdem' McKenzie 2023-07-08 17:48:24 -06:00
parent 1d6eb61b69
commit 94058435a3

View file

@ -43,7 +43,18 @@ WHERE
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
WHERE
user_id = :uid