-- 0011_missing_since.sql — record how long a file or item has been missing. -- -- `missing` says a file is gone; `missing_since` says for how long. That age is -- the whole point: it is what lets an admin tell a drive that is merely -- unplugged from content that is genuinely deleted, and therefore whether the -- explicit purge is safe to run. Without it every rescan would refresh the -- timestamp and a file that has been gone for months would look "just now -- missing" on every pass. ALTER TABLE media_items ADD COLUMN missing_since TEXT NOT NULL DEFAULT ''; ALTER TABLE media_files ADD COLUMN missing_since TEXT NOT NULL DEFAULT '';