🐛 Properly handle fdata features on file-gc task

It also adds a schema validation process after cleaning. If file
does not validates it will be skiped.
This commit is contained in:
Andrey Antukh 2024-02-13 17:34:32 +01:00
parent bc3d268f57
commit afd68fa09d
4 changed files with 284 additions and 245 deletions

View file

@ -141,8 +141,6 @@
" WHERE flr.file_id = ANY(?) AND l.deleted_at IS NULL")]
(db/exec! conn [sql ids])))))
;; NOTE: Will be used in future, commented for satisfy linter
(def ^:private sql:get-libraries
"WITH RECURSIVE libs AS (
SELECT fl.id
@ -409,7 +407,6 @@
(update :colors relink-colors)
(d/without-nils))))))
(defn- upsert-file!
[conn file]
(let [sql (str "INSERT INTO file (id, project_id, name, revn, is_shared, data, created_at, modified_at) "