mancala/apps/backend/src/db/migrations/index.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

14 lines
397 B
TypeScript

import { sql as games001 } from "./001_games";
import { sql as clock002 } from "./002_clock";
export interface Migration {
version: string;
sql: string;
}
// Applied in this order; never change a migration that has been released, add a new one instead.
export const migrations: Migration[] = [
{ version: "001_games", sql: games001 },
{ version: "002_clock", sql: clock002 },
];