Files
mtusi2026lab3-fork/test/helpers/message-epoch.mjs
T
qrtx 5c8bcf0f80 test: cover persistence failover and graceful draining
Add API integration checks, migration compatibility, rolling restart scenarios and a report verification collector.
2026-10-29 11:47:46 +03:00

8 lines
250 B
JavaScript

export async function messageEpoch(prisma, chatId) {
const [row] = await prisma.$queryRawUnsafe(
'SELECT COALESCE(SUM(epoch), 0)::bigint AS epoch FROM public.chat_message_epochs WHERE chat_id = $1::uuid',
chatId,
);
return row.epoch;
}