Hotfix unblocking PR #452 (Stage 3 IMV estimator integration). Adds 030_avito_imv_cache_key_unique.sql: creates UNIQUE INDEX imv_cache_key_uniq_idx on avito_imv_evaluations(cache_key), allowing save_imv_evaluation's ON CONFLICT (cache_key) DO UPDATE to resolve. Migration 018 only created a non-unique composite index, which would have caused runtime error on first IMV cache write. DELETE-USING dedup guards against historical duplicates (no-op on fresh table). BEGIN/COMMIT atomic; IF NOT EXISTS idempotent; CONCURRENTLY unnecessary (table empty). Lexicographic apply order with PR #453's 030_listings_alter_yandex.sql is safe — different tables, no functional interaction. Reviewed by deep-code-reviewer: APPROVE. |
||
|---|---|---|
| .. | ||
| app | ||
| data/sql | ||
| tests | ||
| .dockerignore | ||
| Dockerfile | ||
| pyproject.toml | ||