fleettickets/docs
david kiania 066d866b90 fix(crq): migration 15 creates tickets.crq (live DB never materialized it)
Live-DB reconciliation before seeding CRQ revealed two divergences:
- tickets.crq did NOT exist: 01_tickets_schema.sql was applied 2026-06-15 from a
  version predating its crq section, so the IF-NOT-EXISTS ledger guard has blocked
  it ever since (fn_tickets_for_map + resolve_ticket_geoms already reference crq, so
  they errored if called — masked because the live INC view uses fn_inc_dashboard).
- The live ledger carries un-versioned 13_inc_search_fn.sql / 14_inc_filter_options.sql
  (applied 2026-06-19, absent from this repo).

So 13_crq_columns.sql (ALTER-only, number 13) is replaced by 15_crq_table.sql, which
CREATEs tickets.crq self-containedly (table + geom trigger + raw/typed indexes) and
adds the typed STORED generated columns. Deterministic + idempotent on both the live DB
(crq missing) and a fresh DB (crq minimal from 01). Numbered 15 to sit after the live
ledger's max. Docs/CLI references updated 13->15.

Applied + seeded on the live DB out-of-band (running container, INC image untouched):
39,240 crq rows, 99.99% geocoded (cluster + shared location cache), watermark current,
crq now renders on fn_tickets_for_map.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 23:55:17 +03:00
..
dashboard-api-contract.md docs: dashboard_api endpoint contract for fn_inc_dashboard (handoff) 2026-06-16 01:13:09 +03:00
deployment-and-operations.md fix(crq): migration 15 creates tickets.crq (live DB never materialized it) 2026-06-25 23:55:17 +03:00
implementation.md fix(crq): migration 15 creates tickets.crq (live DB never materialized it) 2026-06-25 23:55:17 +03:00
phase-1-ingestion.md feat(crq): add CRQ ingestion via shared engine + thin inc/crq entrypoints 2026-06-25 23:16:38 +03:00
phase-2-dashboard.md docs: add docs/ — phase-1/phase-2 PRDs + implementation record 2026-06-16 01:05:18 +03:00