root 82ca9afb67
Some checks failed
CI / Lint & Format (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Build All Apps (push) Has been cancelled
CI / E2E Tests (Playwright) (push) Has been cancelled
CI / Deploy to Production (push) Has been cancelled
fix(metering): generate UUID in Node for raw INSERTs into usage_records
Prisma's `@default(uuid())` runs in the client layer and is bypassed by
`$queryRawUnsafe` / `$executeRawUnsafe`. The DB column has no server-side
default and pgcrypto/uuid-ossp aren't enabled, so every aggregate /
increment call failed with 23502 NOT NULL on `id`.

Pass a `randomUUID()` from `node:crypto` as the first parameter in all
four raw INSERTs (aggregateUsage, recordApiRequest, recordWebhookSent,
recordPushSent).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 09:25:10 +00:00
Description
CRM-система для фитнес-клубов
7 MiB
Languages
TypeScript 99.4%
Shell 0.4%
JavaScript 0.1%