mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-12 04:17:16 +02:00
On some databases, migration 20260612222838 (which made media_file.bpm and bit_depth nullable) is recorded as applied in goose_db_version but its DDL never took effect, leaving the columns declared NOT NULL. Since v0.63.0 the scanner writes NULL for tracks without a BPM tag (PR #5603 changed the model fields to *int and removed the nil->0 shim), so scans on those databases fail with "NOT NULL constraint failed: media_file.bpm". Because goose considers the earlier migration already applied, it will never re-run it, so a new migration is required. This migration inspects the columns via PRAGMA table_info and only rebuilds the ones still declared NOT NULL, converting existing 0 values to NULL and preserving the media_file_bpm index. On healthy databases it is a no-op, avoiding a full media_file table rewrite. Fixes #5747 |
||
|---|---|---|
| .. | ||
| migrations | ||
| backup.go | ||
| backup_test.go | ||
| db.go | ||
| db_test.go | ||
| export_test.go | ||