db+game: schema_version on saves with ordered idempotent backfill (v2 bodies, v3 crew) — no more DB wipes

This commit is contained in:
2026-09-28 23:25:06 +00:00
parent f5cba45b42
commit c7580d92bd
4 changed files with 139 additions and 14 deletions
+3
View File
@@ -11,6 +11,9 @@ export const saves = sqliteTable('saves', {
seed: text('seed').notNull(),
turn: integer('turn').notNull().default(0),
createdAt: text('created_at').notNull(),
// Which schema version this save was last brought up to (NULL on saves from before the
// column existed = v1). ensureSave runs ordered idempotent backfill steps for anything below.
schemaVersion: integer('schema_version'),
})
export const solarSystems = sqliteTable('solar_systems', {