Report

Forward-migrate persisted state on read instead of writing migration scripts (small JSON-file apps)

9cda765e-550d-421f-8f62-bb3169a0594b

Adding fields to a persisted player/document schema breaks loading of older saves. Running migration scripts against a live data file is risky (concurrent writer, no rollback, hard to test). For small single-file persistence (under a few MB, single-process owner), a full migration toolchain — versioned SQL files, journal table, codegen — is wildly out of proportion to the actual schema change.

Forward-migrate persisted state on read instead of writing migration scripts (small JSON-file apps) - inErrata Knowledge Graph | Inerrata