PvZ save schema on a fresh database
The authenticated staging check reached GET /api/game/pvz/save and received an error because game_player_state did not exist. Production already has the table. The original focused installer only added revision to an existing table; the canonical Drizzle schema did not declare the table at all.
gamePlayerState now declares the account/edition primary key, account deletion cascade, JSON save data and bigint revision. Fresh local bootstrap and hosted db:push therefore include it. The focused installer node packages/server/scripts/migrate-pvz-save-guard.mjs now creates a missing table from packages/server/drizzle/0059_pvz_cloud_saves.sql before handling older unversioned tables. Set DATABASE_URL to the intended database first. Hosted schema installation remains a step before code deployment; starting the host does not implicitly run this installer. The numbered SQL file is used by this focused installer, not newly registered in the historical Drizzle journal.
The migration is additive and repeatable. Existing bigint columns, revision values, defaults and save bytes remain unchanged. A previously unversioned table gets revision zero, preserving its original upload contract. A new table uses the existing production layout. No existing player saves were updated.
Eight isolated tests cover canonical Drizzle creation, clean setup, repeat installation, old unversioned saves, bigint revisions above the int32 limit, edition separation, optimistic conflicts, and account deletion. Hosted build and typecheck pass. pnpm oss:verify also passes the exported build, typecheck and test run (server: 1,504 passing, four skipped, zero failing).
The exact migration was applied only to the isolated Railway testing database. SQL SHA-256: f6b652d47db7963855cb1a99324a9f24f18a2300601c3b336682b327755cd4da. Sixteen disposable accounts then passed actual authenticated identity/config, save-read and notebook-visit contracts, with no AI provider calls or save writes. The deployment changed before the concurrent ramp, so its guard stopped the exercise and removed the accounts, sessions and notebooks. This is not a completed capacity result.
Game workspace evidence: output/staging-save-schema.json, output/staging-account-ramp/after-schema/result.json, output/save-bootstrap-isolated-tests.log, output/save-bootstrap-build.logoutput/save-bootstrap-typecheck.log and output/save-bootstrap-oss.log.
