feat(22i): domrf_kn_documents new table + parser #305

Merged
lekss361 merged 1 commit from fix/22i-documents-v2 into main 2026-05-17 15:21:32 +00:00

1 commit

Author SHA1 Message Date
lekss361
5bcaa67a6d feat(22i): domrf_kn_documents new table + parser
- data/sql/112_22i_domrf_documents.sql: CREATE TABLE domrf_kn_documents
  with UNIQUE(obj_id, doc_type, doc_num, file_url) + index (obj_id, doc_type).
  Renamed from original 100_* to 112 to avoid NN collision (100 = mv_layout
  weighted_avg PR #290 merged; 111 = 22f obj_checks PR #303).
- backend/app/services/scrapers/documents.py: extract_documents() +
  upsert_documents() with SAVEPOINT per-row + canonical doc_type normalisation
  + download stub.

Payload audit (obj_id=65136): kn/object bulk list does NOT contain documents
field. Documents live on per-object endpoint /object/{obj_id}/documents
(not yet scraped). Follow-up PR needed to wire endpoint into domrf_kn.py
scrape loop.

Issue #297 22i.
2026-05-17 18:13:52 +03:00