fix: clearing a wrong slot's MBID clears its source too, as tracks_mbid_source_pair requires (M498)
release / govulncheck (push) Successful in 15s
release / web (push) Successful in 1m24s
release / go (push) Successful in 1m37s
release / android (push) Successful in 5m1s
release / integration (push) Successful in 5m4s
release / Build signed APK (releases and dev) (push) Successful in 5m9s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 16s
release / Verify release artifacts (tag releases only) (push) Skipped
release / govulncheck (push) Successful in 15s
release / web (push) Successful in 1m24s
release / go (push) Successful in 1m37s
release / android (push) Successful in 5m1s
release / integration (push) Successful in 5m4s
release / Build signed APK (releases and dev) (push) Successful in 5m9s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 16s
release / Verify release artifacts (tag releases only) (push) Skipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -58,7 +58,7 @@ func (q *Queries) ClearStaleSuspectSourceTracks(ctx context.Context, pattern str
|
||||
|
||||
const clearTrackMbids = `-- name: ClearTrackMbids :exec
|
||||
UPDATE tracks
|
||||
SET mbid = NULL
|
||||
SET mbid = NULL, mbid_source = NULL
|
||||
WHERE id = ANY($1::uuid[])
|
||||
`
|
||||
|
||||
@@ -66,6 +66,7 @@ UPDATE tracks
|
||||
// wrong-slot removal). The MBID came from that file, so it names the song kept
|
||||
// elsewhere on the album, and missing-pair folding would fold the emptied slot
|
||||
// into it: twelve slots went that way on 2026-10-20 and were never wanted back.
|
||||
// mbid_source goes with it (tracks_mbid_source_pair).
|
||||
func (q *Queries) ClearTrackMbids(ctx context.Context, ids []pgtype.UUID) error {
|
||||
_, err := q.db.Exec(ctx, clearTrackMbids, ids)
|
||||
return err
|
||||
|
||||
@@ -221,8 +221,9 @@ UPDATE tracks
|
||||
-- wrong-slot removal). The MBID came from that file, so it names the song kept
|
||||
-- elsewhere on the album, and missing-pair folding would fold the emptied slot
|
||||
-- into it: twelve slots went that way on 2026-10-20 and were never wanted back.
|
||||
-- mbid_source goes with it (tracks_mbid_source_pair).
|
||||
UPDATE tracks
|
||||
SET mbid = NULL
|
||||
SET mbid = NULL, mbid_source = NULL
|
||||
WHERE id = ANY(sqlc.arg(ids)::uuid[]);
|
||||
|
||||
-- name: ClearTracksMissing :execrows
|
||||
|
||||
Reference in New Issue
Block a user