feat: expose file attachment stats as item properties/columns #37
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Surface file attachment metadata and ensure item modification tracking covers all data changes, available as columns in the items table.
Motivation
Users need to see at a glance which items have files attached, how many, and how large they are — without opening each item's detail view. The item's
updated_attimestamp should also reflect any change to the item's data (properties, revisions, files, BOM entries, project tags), not just direct item edits.Proposed Properties
file_countfiles_total_sizefiles_latest_uploadfiles_latest_modifiedItem
updated_atScopeThe item's
updated_atcolumn already exists but should be touched whenever any related data changes:This ensures sorting by "last modified" in the items table gives meaningful results.
Implementation Notes
updated_attouch: addUPDATE items SET updated_at = now() WHERE part_number = ...to each relevant handler, or use DB triggersGET /api/itemsandGET /api/items/{pn}responses