Live game snapshots become version 2 with the clock and each move's time left. On restore the running clock goes on from the start of the turn, so downtime is not charged; version 1 snapshots get a new clock. Saved games keep the initial time (migration 002_clock) and each move's time left.
5 lines
190 B
TypeScript
5 lines
190 B
TypeScript
// Time each player started with; NULL for games saved before the game clock. Each move's clock is in `moves`.
|
|
export const sql = `
|
|
ALTER TABLE games ADD COLUMN clock_initial_ms integer;
|
|
`;
|