PPP Database Migrations
This guide covers the standard workflow for updating the PPP Postgres schema.
When to Run Migrations
- Add or modify tables/columns in
packages-shared/ppp/src/schema-groups/. - Update any related Zod schemas in
packages-shared/ppp/src/zodSchema.ts(if applicable).
Apply Schema Changes
From packages-shared/ppp:
bash
pnpm db:pushThen rebuild the workspace (so backend packages pick up updated types):
bash
cd ../..
pnpm buildNotes
- Migrations live in
packages-shared/ppp/drizzle/. - Use SQL migrations for controlled changes (add columns, defaults, backfills).
- Make sure
DATABASE_URLis set for the target environment.
Related Docs
docs/site/development/backend/environment.mddocs/site/architecture/storage-service.md