From 92594c48d0da5450bb805f8a04c3c3495ea45558 Mon Sep 17 00:00:00 2001 From: Evan Date: Wed, 5 Mar 2025 14:51:56 -0800 Subject: [PATCH] update end => end_time, end is reserved keyword --- src/server/Archive.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/server/Archive.ts b/src/server/Archive.ts index c60e8ceac..8227de6ee 100644 --- a/src/server/Archive.ts +++ b/src/server/Archive.ts @@ -36,8 +36,8 @@ export async function archive(gameRecord: GameRecord) { async function archiveToRedshift(gameRecord: GameRecord) { const row = { id: gameRecord.id, - start: new Date(gameRecord.startTimestampMS), - end: new Date(gameRecord.endTimestampMS), + start_time: new Date(gameRecord.startTimestampMS), + end_time: new Date(gameRecord.endTimestampMS), duration_seconds: gameRecord.durationSeconds, number_turns: gameRecord.num_turns, game_mode: gameRecord.gameConfig.gameType, @@ -58,12 +58,12 @@ async function archiveToRedshift(gameRecord: GameRecord) { const params = { Sql: ` INSERT INTO game_results ( - id, start, end, duration_seconds, number_turns, game_mode, + id, start_time, end_time, duration_seconds, number_turns, game_mode, winner, difficulty, map, players ) VALUES ( '${row.id}', - '${row.start.toISOString()}', - '${row.end.toISOString()}', + '${row.start_time.toISOString()}', + '${row.end_time.toISOString()}', ${row.duration_seconds}, ${row.number_turns}, '${row.game_mode}',