Upgrading
Docker
See Docker → Updating.
From source
-
Pull the new code:
Terminal window git pull -
Reconcile dependencies:
Terminal window bun install -
Apply database migrations.
In production:
Terminal window bun run --cwd packages/prisma db-deployIn development (this can clear a development database in some cases):
Terminal window bun run --cwd packages/prisma db-migrate -
Compare your
.envagainst.env.examplefor new or renamed variables. -
Rebuild and restart:
Terminal window bun run buildbun run startIn development,
bun run devis enough.
:::caution Always migrate the database before building for production. Building against an old schema and migrating afterwards leaves the running app briefly inconsistent with the data it reads. :::
Rolling back
Prisma migrations are forward-only. Take a database dump before upgrading a production instance; that dump is your rollback path.