mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 05:50:35 +00:00
Restoring a file only un-marked the database rows (`file`, `file_media_object`, `file_change`, `file_data`, `file_thumbnail`, `file_tagged_object_thumbnail`), not the storage objects those rows reference. An object that was already marked for deletion stayed marked while a live row pointed at it, and those foreign keys are `NO ACTION`: the storage GC cannot delete it and skips it forever (and before the GC learned to skip, it cost the whole nightly run). Restoring a team had the same gap with its font variants. Both restores now unmark the storage objects of the rows they bring back: the media and the thumbnail of the file media objects, the media of the file and object thumbnails, the `storage-ref-id` of the file data, and the four files of a font variant. Objects referenced by other rows are left alone. AI-assisted-by: deepseek-v4.1-flash