fix(collections): UpdateCollectionViewSettings wrote a nonexistent updated_at column

The query said `SET view_settings = $2, updated_at = NOW()` but the
collections table has never had an updated_at column — every call
failed with 42703. The one caller (media_scanner's series-import
provenance write) discards the error, so the failure was silent:
imported-from-series view settings never persisted. Surfaced while
writing the sibling UpdateCollectionMatchMode query for item 2.4 (the
item-2.4 commit message prematurely claimed this fix — this is that
fix, for real).
This commit is contained in:
John O'Keefe committed 2026-10-30 16:55:16 -04:00
1 parent abb7c84833
commit cc56b9ef2a
2 files changed
+10 -2

No files matched your search

+5 -1
View File
@@ -3496,7 +3496,11 @@ RETURNING *;
-- A2c §2.4: provenance + playlist flags on an existing collection without
-- touching the rest of the row.
-- name: UpdateCollectionViewSettings :exec
UPDATE collections SET view_settings = $2, updated_at = NOW() WHERE id = $1;
-- (Historical bug, fixed 2026-10-30: this wrote `updated_at = NOW()` but
-- collections has no updated_at column — the scanner's series-import
-- call has been failing silently, its error discarded. Fixed by
-- dropping the phantom column write.)
UPDATE collections SET view_settings = $2 WHERE id = $1;
-- Smart-collection match semantics (plan item 2.4): flip any|all on its
-- own channel — the rules page toggle writes exactly this column.