Commit 77eff0b8 authored by Aryan Noshirvnai's avatar Aryan Noshirvnai

Fix upload 500: index sha256(fingerprint) instead of the raw fingerprint

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.
parent 73e00a51
Pipeline #1292 failed with stage