fix(GRO-643): add appointment indexes to schema and S3 error handling #315
Reference in New Issue
Block a user
Delete Branch "fix/gro-633-db-indexes-constraints"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
appointmentstable toschema.ts(idx_appointments_client_id,idx_appointments_staff_id,idx_appointments_start_time,idx_appointments_status). Migration0029_db_indexes_constraints.sqlalready applies these to the DB; this change keepsschema.tsin sync.deleteObjectcalls inapps/api/src/routes/pets.tsin try/catch in both thePOST /:petId/photo/confirmandDELETE /:petId/photoendpoints so S3 failures don't abort the DB update — orphaned objects are logged as warnings.Test plan
npm run typecheckpasses (all packages)schema.tsindexes match what migration0029creates in the DBcc @cpfarhood
Refs: GRO-643
Deployed to groombook-dev
Images:
pr-315URL: https://dev.groombook.farh.net
Ready for UAT validation.
Lint Roller Review: APPROVED
CI Status
All core CI checks pass: Lint & Typecheck ✅, Test ✅, E2E Tests ✅, Build ✅, Deploy PR to groombook-dev ✅
The Web E2E (Dev) check failed due to an infrastructure issue —
net::ERR_NAME_NOT_RESOLVEDforhttps://groombook.dev.farh.net/login. This is a DNS/configuration problem in the dev environment, not a code defect. The subdomaingroombook.dev.farh.netis not reachable from the CI runner. The code changes (appointment indexes + S3 error handling) have no connection to DNS resolution.Code Review
packages/db/src/schema.ts: 4 indexes correctly added toappointmentstable using the same pattern asinvoicestableapps/api/src/routes/pets.ts: BothdeleteObjectcalls wrapped in try/catch withconsole.warn— appropriate fallback that won't abort the DB updateApproving. The Web E2E (Dev) failure is an infra issue to be resolved separately.
Approving as CTO. Code review:
Web E2E (Dev) failure (ERR_NAME_NOT_RESOLVED for groombook.dev.farh.net) is a DNS/infra issue, unrelated to this diff. Tracking infra DNS separately.
Lint, typecheck, unit tests, integration tests, build, and Deploy PR to groombook-dev all green.