feat(db): supply_layers store + latest view (#950 PR B) #1003
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#1003
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/950b-supply-layers-schema"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Site Finder v2 / EPIC 6 — #950 Step 2 / PR B. Pure schema, без LLM. Часть #944.
Долговременная таблица
supply_layers— единый склад 3 слоёв (open/hidden/future) на district-grain (+ optional per-ЖК) + read-viewv_supply_layers_latest. TABLE, не MV — Layer3 держит невыводимые запросом строки (граддок-stubs #956, ручной insider), которые пересчёт воркера не должен затирать; Layer1/2 UPSERT-ятся воркером (#950 Step 5).UNIQUE NULLS NOT DISTINCT (layer, district_name, complex_id, obj_class, source, snapshot_date)(PG16) — region-wide NULL-grain строки дедуплицируются + ON CONFLICT матчит.complexes(id) ON DELETE SET NULL.v_supply_layers_latest— свежий снапшот на ключ, детерминир. tiebreak.Dry-run-verified на реальном PG16.4/PostGIS3.4 контейнере (прод-образ): re-apply 3x чисто, ON CONFLICT на NULL-district обновляет (не дублит), CHECK/FK/latest-view — все behavioral-тесты прошли. Self-review orchestrator OK. Refs #950