mancala/apps/backend/src/db/migrations/002_clock.ts
Halit Aksoy c610844e26 feat(backend): keep the game clock across restarts and in saved games
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.
2026-10-16 01:30:39 +03:00

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;
`;