After #129 fixed quarter_cad_number, the on-demand НСПД ingest of a real not-pre-loaded parcel hit the NEXT cad_parcels NOT NULL column: source (NotNullViolation) → geometry transaction rolled back → POST /analyze still stuck. Repro 66:41:0610029:83 (job 57: quarter derived by #129, source null). Migration 130: extend the #129 BEFORE INSERT/UPDATE trigger function to also default source→'nspd' when NULL (column DEFAULT can't help — INSERT binds explicit NULL; trigger overrides it). Explicit sources ("search"/"wms_grid_walk") respected — only NULL is filled. cad_parcels NOT NULL surface now fully covered (cad_num/quarter[#129]/category_id[literal]/source[#130]/fetched_at+updated_at[NOW]). Dry-run-verified on prod: null quarter+source → 66:41:0610029 + nspd, INSERT ok. |
||
|---|---|---|
| .. | ||
| sql | ||
| playwright_state.json | ||