-- Migration 121: document lead_time_days as NOT COLLECTED -- ───────────────────────────────────────────────────────────────────────────── -- Verified 2026-07-04: lead_time_days is 0 % populated on every time-series table -- price_observations : 1,378,984 rows → 0 filled -- stock_observations : 85,406 rows → 0 filled -- stock_snapshots : 0 rows (LLM-crawler path is dormant) -- -- The plumbing exists (crawler-llm stock-schema captures lead_time_days and -- writes it to stock_snapshots; upsertPriceObservation accepts a leadTimeDays -- param) but the ACTIVE ingestion path never supplies a value, and there is no -- evidence any tracked vendor page exposes a machine-readable lead time. -- -- Rather than fabricate a default, this migration documents the column as -- not-collected so no consumer invents one. Lupo already renders "k.A." / "n/a" -- and blends only the two signals it actually measures (availability, breadth). -- Populating this field is a SCRAPER-side task (extend the active crawlers to -- read a delivery/lead-time badge) — out of scope for a schema migration. -- ───────────────────────────────────────────────────────────────────────────── COMMENT ON COLUMN price_observations.lead_time_days IS 'NOT COLLECTED (verified 2026-07-04): 0 % populated. The active scraper path never ' 'supplies a lead time. Do NOT default this — treat NULL as "unknown / not captured". ' 'Populating it requires scraper work (read a delivery-time badge on the vendor page).'; COMMENT ON COLUMN stock_observations.lead_time_days IS 'NOT COLLECTED (verified 2026-07-04): 0 % populated. Treat NULL as "unknown". See ' 'price_observations.lead_time_days.'; COMMENT ON COLUMN stock_snapshots.lead_time_days IS 'Captured by the crawler-llm path (stock-schema.lead_time_days) but that path is ' 'currently dormant (0 rows). Treat NULL as "unknown / not captured".'; INSERT INTO _migrations (filename) VALUES ('121-lead-time-not-collected-doc.sql') ON CONFLICT (filename) DO NOTHING;