Cascade when deleting files
This commit is contained in:
parent
1d6eb61b69
commit
94058435a3
1 changed files with 12 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue