VibeKit
Ship and Operate

Database Migrations

Create migration history for durable schema changes and prove it on disposable data first.

For schema changes, ask your agent to use database-schema-change.

The safe path is:

  1. Change packages/database/prisma/schema.prisma.
  2. Create a reviewed migration.
  3. Regenerate Prisma and Zod output.
  4. Apply the full migration chain to a fresh disposable PostgreSQL database.
  5. Test the feature against the migrated schema.

Production applies tracked migrations with:

bun run --cwd packages/database db:migrate

Never use db:push on shared, staging or production data. Never edit an old shipped migration to hide drift.