Migration 130 only filled house_id_fk for listings carrying house_source/house_ext_id. Prod (2026-06-27): 1884 active NULL-FK rows remain, 0 with house_source/ext_id (130 re-run = no-op). They were matched via the per-listing-identity path the realtime mirror uses when no house catalog id exists: match_or_create_house(ext_source=source, ext_id=source_id) -> Tier-1 house_sources lookup (confidence 1.0). 136 replays that exact lookup offline: UPDATE listings SET house_id_fk = house_sources.house_id WHERE (ext_source=source, ext_id=source_id) and house_id_fk IS NULL. Faithful to base.py:704-750; idempotent (NULL guard); deterministic (no fuzzy/geo); collision-safe (catalog ids live under distinct ext_source like 'cian_newbuilding'). Dry-run BEGIN/ROLLBACK fills 4608 NULL-FK rows (744 active), restoring estimator Tier-S "same-building" grouping. The remaining ~1140 active need re-scrape/ re-match (scraper coverage — #1781 Лёха). Refs #1781 |
||
|---|---|---|
| .. | ||
| sql | ||