Skip to content

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:push

Then rebuild the workspace (so backend packages pick up updated types):

bash
cd ../..
pnpm build

Notes ​

  • Migrations live in packages-shared/ppp/drizzle/.
  • Use SQL migrations for controlled changes (add columns, defaults, backfills).
  • Make sure DATABASE_URL is set for the target environment.
  • docs/site/development/backend/environment.md
  • docs/site/architecture/storage-service.md

Internal documentation — org members only