Beyond empty-database testing

Your migration passed.
Production still might not.

Existing rows, relationships, identities, files, and migration history are where risky changes break. Rehearse them locally before you deploy.

Monthly downloads of @rehearsal-db/core from npm
✓ Reviewed baseline✓ Exact migrations✓ Your app proof
01

Install it

npm install --save-dev @rehearsal-db/core

Why an empty database is not enough#

Most migration tests start with an empty database. Production does not.

Existing rows, relationships, authentication identities, stored files, and migration history are where risky changes break. A migration can build successfully and still fail against the data and application behavior you actually have.

Rehearsal catches those problems before deployment. It restores a reviewed, sanitized baseline into a disposable local PostgreSQL or Supabase environment, applies only the exact migrations you approve, and runs your application's own proof.

The CLI is free and MIT-licensed. Prefer clicks to commands? Install the free VS Code Starter preview. All features included in its Starter-licensed releases are free indefinitely, with no account, payment card, or trial period.

Empty-database tests miss… Rehearsal exercises…
old rows and edge cases a reviewed, production-shaped baseline
relationships between data, identities, and files database, Auth, and Storage in one local sandbox
whether the product still behaves correctly your automated proof and hands-on application walkthrough

Pick the path that fits today#

You do not need to read everything before your first rehearsal. Start with the outcome you want, then follow the links when a term or safety check is new.

I want to… Go here
Set up my own project Getting started
Use the free visual workbench in VS Code Install VS Code Starter
Try Rehearsal without touching my app Hands-on tutorial
Understand what makes a copy safe Baselines and Sanitization
Look up a command or setting CLI commands and Configuration
Reduce Docker and Supabase resource use Container runtime lifecycle
Add editor and compiler type checks TypeScript
Fix something that did not work Troubleshooting

The short version#

Rehearsal restores an approved local baseline, applies only the migration files you reviewed, and runs the application checks your project owns. The normal workflow stays on your computer and does not deploy anything.

  1. Prepare a safe baseline.
  2. Review the exact candidate migrations.
  3. Run them in a disposable local database.
  4. Prove the application behavior that matters.
  5. Open the sandbox for hands-on testing.

Safety is part of the workflow#

Rehearsal does not ask you to trust one giant switch. Baseline checksums, local-only networking, exact confirmation digests, project-owned proofs, and narrowly owned cleanup each protect a different boundary.

Start with synthetic data when you can. If a project needs a production-shaped copy, read Production-shaped preparation before providing any source access.

Still unsure where to begin?#

Run the interactive guide from the project you want to test:

bash
npx rehearsal

It reads the project state, explains the next safe step, and keeps the full command reference available when you need it.

Type a command, concept, or error message.