- 047_cian_history_sanitize.sql: dedup existing rows then add
UNIQUE(listing_id, change_time) so ON CONFLICT DO NOTHING in
cian_detail.save_detail_enrichment suppresses real duplicates,
not just PK collisions. Idempotent via DO $$ pg_constraint guard.
- cian_valuation._save_to_cache: fill price_rub/accuracy (mig 026),
low_price/high_price (mig 044), house_id/listing_id (mig 044).
COALESCE on house_id/listing_id preserves existing FK on cache refresh.
- cian_valuation._load_from_cache: restore low_price/high_price from DB
into sale_price_from/sale_price_to so callers get the full band.
- estimate_via_cian_valuation: add house_id/listing_id kwargs (default None),
pass through to _save_to_cache. No callsite changes needed (defaults preserve
existing behavior; PR 4 can supply IDs when context is available).