1
0
Fork 0
polaris-task-force/tests
Z8MB1E e3926ab828 fix(db): chunk drizzle json_build_array under postgres argument cap
Postgres caps function arguments at 100. `payload_locked_documents_rels`
holds one foreign-key column per collection, and Drizzle hydrates the
locked document's polymorphic relationship with a single
`json_build_array(...)` over all of them. At 103 collections the query
throws 54023 and every admin edit view breaks while a lock row exists.

Patch drizzle-orm 0.45.2 to split the call into 100-argument groups
joined with `::jsonb || ::jsonb`, mirroring the unmerged upstream PR
drizzle-team/drizzle-orm#4495. Relations with 100 or fewer columns keep
the original code path unchanged.

Add tests/int/locked-documents-query.int.spec.ts, which creates a lock
row and reads it back at depth 1 (what getIsLocked and
handleFormStateLocking do). It fails on pristine drizzle with the exact
54023 error and passes with the patch.
2026-10-21 10:31:11 -04:00
..
audit test(audit): support exact route filtering in the mobile audit 2026-10-13 10:38:45 -04:00
e2e test(test-db): template database + schema-hash cache + clone primitives 2026-10-21 10:03:33 -04:00
fixtures fix(minigames): end Bomperator teleport-back with trace-proven envelope correction 2026-10-18 02:11:15 -04:00
int fix(db): chunk drizzle json_build_array under postgres argument cap 2026-10-21 10:31:11 -04:00
push-schema.ts test(int-suite): auto-accept drizzle push prompts in tests/push-schema.ts 2026-10-21 10:03:33 -04:00
seed-baseline.ts feat(test): run tests against a dedicated truncated database 2026-09-22 17:58:17 -04:00
test-db.ts test(test-db): template database + schema-hash cache + clone primitives 2026-10-21 10:03:33 -04:00
vitest-global.ts test(test-db): template database + schema-hash cache + clone primitives 2026-10-21 10:03:33 -04:00
vitest-teardown.ts feat(test): run tests against a dedicated truncated database 2026-09-22 17:58:17 -04:00