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:
1 parent
abb7c84833
commit
cc56b9ef2a
2 files changed
+10
-2
No files matched your search
@@ -18317,7 +18317,7 @@ func (q *Queries) UpdateCollectionRulesJSON(ctx context.Context, arg UpdateColle
|
||||
}
|
||||
|
||||
const UpdateCollectionViewSettings = `-- name: UpdateCollectionViewSettings :exec
|
||||
UPDATE collections SET view_settings = $2, updated_at = NOW() WHERE id = $1
|
||||
UPDATE collections SET view_settings = $2 WHERE id = $1
|
||||
`
|
||||
|
||||
type UpdateCollectionViewSettingsParams struct {
|
||||
@@ -18327,6 +18327,10 @@ type UpdateCollectionViewSettingsParams struct {
|
||||
|
||||
// A2c §2.4: provenance + playlist flags on an existing collection without
|
||||
// touching the rest of the row.
|
||||
// (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.)
|
||||
func (q *Queries) UpdateCollectionViewSettings(ctx context.Context, arg UpdateCollectionViewSettingsParams) error {
|
||||
_, err := q.db.Exec(ctx, UpdateCollectionViewSettings, arg.ID, arg.ViewSettings)
|
||||
return err
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user