PostgreSQL requires globally unique index names (unlike MySQL which scopes
them per table). Prefix generic names: idx_user→idx_al_user/idx_rt_user,
idx_token→idx_rt_token, idx_case/idx_code/idx_haupt→idx_icd_*.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Switch from pymysql to psycopg2-binary, update connection string to
postgresql+psycopg2, replace MySQL-specific JSON imports with generic
SQLAlchemy JSON, convert MySQL prefix index to PostgreSQL left() function,
and remove FetchedValue() (unnecessary with PostgreSQL).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>