Commit graph

1 commit

Author SHA1 Message Date
e961ea9435 feat(domrf): persist domrf_kn_objects.free_flats (#950 PR A)
Parse freeFlatsInfo.numberFlats (currently-listed flat count) from the
kn-API payload into a new nullable free_flats INT, mirroring price_min_rub
(extraction via _to_int, UPSERT column/bind, ON CONFLICT overwrite). _to_int
rejects bool, preserves 0, truncates float, and is overflow-safe.

Migration 124 adds the column + COMMENT and backfills historical rows
deterministically from the stored raw payload (domrf_raw_endpoints, section
kn_api) without re-scraping — same jsonb_array_elements pattern already
proven on prod in migration 121, plus a {1,9}/{1,18} digit-cap so a stray
numeric string can never overflow int4/bigint at the deploy gate.

Unblocks object-level Layer2 (Site Finder v2 EPIC 6): hidden = flat_count
(total PD) − free_flats (listed now).
2026-06-03 01:05:05 +05:00