Files
scoreodonto.com/backend
VPS 4 Builder 38bbf36735 fix(backend): lowercase all column names in buildInsert/buildUpdate and explicit queries
All PostgreSQL columns are stored lowercase (PG folds unquoted identifiers).
The previous code quoted camelCase keys ("corAgenda", "builderId", etc.) which
caused column-not-found errors.

- buildInsert: k.toLowerCase() for all column names, no more double-quotes
- buildUpdate: k.toLowerCase() for SET clause and WHERE column
- dentistas/register: "corAgenda" → coragenda
- procedimentos PUT: "procedimentoId" → procedimentoid in DELETE
- gto_builders INSERT: "pacienteId"/"dentistaId"/"credenciadaId" → lowercase
- gto_items queries: "builderId" → builderid, "valorTotal" → valortotal
- guias: "dataSolicitacao"/"beneficiarioNome"/etc → lowercase with normalizedSort

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 04:18:29 +02:00
..