-- Records which version of the scanner's tag-extraction logic last wrote a
-- track's tag-derived columns (#2499).
--
-- DEFAULT 0 is the point of this migration: every existing row lands below the
-- scanner's current library.tagReadVersion, so the next scan re-reads its tags
-- instead of short-circuiting on the mtime check. That repairs genre values the
-- old reader welded together ("Alternative Rock" + "Rock" -> "Alternative
-- RockRock") without asking the operator to wipe and rebuild the library.
--
-- Bump library.tagReadVersion in Go — not this default — whenever a tag
-- extraction fix needs to reach already-indexed files. That makes tag repairs a
-- self-healing scan rather than a manual full rebuild, which is why this is a
-- version number and not a boolean "needs_reread" flag.
ALTER TABLE tracks
    ADD COLUMN tag_read_version smallint NOT NULL DEFAULT 0;
