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