mirror of
https://github.com/penpot/penpot.git
synced 2025-06-15 21:11:39 +02:00
🐛 Fix issues on deleting library which is in use by deleted files
This commit is contained in:
parent
11018581ed
commit
ce7eed5ea0
3 changed files with 21 additions and 22 deletions
|
@ -488,11 +488,12 @@
|
|||
;; --- Query: Files that use this File library
|
||||
|
||||
(def ^:private sql:library-using-files
|
||||
"SELECT f.id,
|
||||
"SELECT f.id,
|
||||
f.name
|
||||
FROM file_library_rel AS flr
|
||||
INNER JOIN file AS f ON f.id = flr.file_id
|
||||
WHERE flr.library_file_id = ?;")
|
||||
FROM file_library_rel AS flr
|
||||
JOIN file AS f ON (f.id = flr.file_id)
|
||||
WHERE flr.library_file_id = ?
|
||||
AND (f.deleted_at IS NULL OR f.deleted_at > now())")
|
||||
|
||||
(s/def ::library-using-files
|
||||
(s/keys :req-un [::profile-id ::file-id]))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue