Prod migrate — Operations Intelligence v1.4
Operations Intelligence v1.4 — prod database apply
Apply after code deploy. Backfills (18220000, 18230000) are already on prod.
Prod status (June 2026)
| Migration | Purpose | Prod |
|---|---|---|
20260617120000_reports_v2_operational_kpis | Base Operational KPIs RPC | ✓ |
20260618120000_reports_v2_operator_productivity | Base Operator Productivity RPC | ✓ |
20260618141000_pick_lists_delivered_by | delivered_by column | ✓ |
20260618150000_reports_v2_operator_productivity_audit | Pick/pack attribution | ✓ |
20260618200000_reports_v2_operational_kpis_fulfilment_align | Align KPIs with OMS stages | ✓ |
20260618210000_pick_lists_dispatched_by | dispatched_by column | ✓ |
20260618220000_backfill_pick_list_dispatch_deliver | Historical deliver credit | ✓ |
20260618230000_backfill_dispatched_by_from_packer | Historical dispatch credit | ✓ |
20260618240000_reports_v2_operator_productivity_perf | Operator Productivity timeout fix | pending |
20260618260000_reports_v2_operational_kpis_v1_4 | KPI grain, stickers, series perf (final RPC) | pending |
Dev may show extra schema_migrations rows from iterative work (17140000–17190000, etc.). Those files are not in the repo; prod never needs them.
Apply command
CONFIRM_PROD_MIGRATE=yes node scripts/db/apply-selected-migrations.mjs --prod \ 20260618240000_reports_v2_operator_productivity_perf \ 20260618260000_reports_v2_operational_kpis_v1_4Verify:
node scripts/db/check-oms-ops-migrations.mjsSmoke-test:
/reports/v2/operations/operational-kpis?from=2026-05-01&to=2026-05-31/reports/v2/operations/operator-productivity?from=2026-05-01&to=2026-06-17