fix: 투표 UTC wall과 migration 시간대 경계를 고정한다

This commit is contained in:
2026-08-24 09:18:42 +00:00
parent 821b8a0723
commit 7a1254cb3a
15 changed files with 667 additions and 25 deletions
@@ -2479,12 +2479,14 @@ const insertVoteSelection = async (
if (!ctx.commandDb) {
return 'missing';
}
const createdAt = new Date();
const rows = await ctx.commandDb.$queryRaw<Array<{ id: number }>>(GamePrisma.sql`
INSERT INTO vote (vote_id, general_id, nation_id, selection)
INSERT INTO vote (vote_id, general_id, nation_id, selection, created_at)
SELECT poll.id,
${general.id},
${general.nationId},
CAST(${JSON.stringify(selection)} AS jsonb)
CAST(${JSON.stringify(selection)} AS jsonb),
${createdAt}
FROM vote_poll poll
WHERE poll.id = ${command.voteId}
ON CONFLICT (vote_id, general_id) DO NOTHING