• Aryan Noshirvnai's avatar
    Fix upload 500: index sha256(fingerprint) instead of the raw fingerprint · 77eff0b8
    Aryan Noshirvnai authored
    Real uploads were failing with a 500 on prod's Postgres - "index row
    size 3184 exceeds btree version 4 maximum 2704" on both
    ix_library_songs_fingerprint and the IdentifiedTrack cache's unique
    index. A Chromaprint fingerprint for a long/complex track can run
    several KB, well past Postgres's btree row-size limit; SQLite never
    enforces that, so every local/dev upload worked fine until a real one
    hit Postgres. Dedup/cache lookups now filter on a new fingerprint_hash
    column (sha256, fixed 64 hex chars) instead - fingerprint itself stays
    on the row as unindexed reference data. Migration backfills existing
    rows in Python so it runs correctly against both SQLite and Postgres.
    77eff0b8
music.py 13.6 KB