Flea Flicker
|
4884961c8e
|
feat(GRO-2152): route optimization schema migration
CI / Test (pull_request) Successful in 53s
CI / Lint & Typecheck (pull_request) Successful in 1m0s
CI / Build & Push Docker Images (pull_request) Successful in 4m13s
Add the database foundation for mobile groomer route optimization:
- clients: latitude/longitude (double precision) + geocodedAt
- groomer_routes: per-(staff, date) route with route_status enum,
totals, optimizedAt; UNIQUE(staff_id, route_date)
- route_stops: ordered stops FK->groomer_routes (cascade) + appointments,
lat/lng, per-leg travel mins/distance, bufferMins;
UNIQUE(route_id, appointment_id) and UNIQUE(route_id, stop_order)
- business_settings: defaultTravelBufferMins (default 15),
routeOptimizationProvider (default nominatim), googleMapsApiKey
(encrypted at rest at the app layer)
- Idempotent hand-authored migration 0041 + journal entry (when=max+1)
Lands in packages/db (the deployed schema/migration source per the
Dockerfile migrate stage); apps/api is the legacy CI-only copy.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
2026-06-08 07:48:10 +00:00 |
|