Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions examples/migrations-showcase/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# migrations-showcase

Generates a realistic 20-migration history with the real Prisma Next migration flow, for demoing migration-aware tooling (e.g. the Prisma Studio Migrations view).

`steps/` holds 20 cumulative snapshots of a project-tracker schema — models, fields, enums, relations, indexes and uniques are added over time, and a few steps are deliberately destructive (a dropped column, a retired model) so downstream diffs exercise every change kind.

## Run it

```bash
pnpm --filter migrations-showcase generate
```

For each step the script emits the contract, plans an attested migration bundle into `migrations/app/`, and applies it to an ephemeral Prisma Postgres dev database. Every apply writes one `prisma_contract.ledger` row carrying the migration's `contract_json_before` / `contract_json_after` snapshots.

After the last step the script captures `prisma_contract.marker` and `prisma_contract.ledger` into `fixture/prisma-contract.json`, ready to be replayed by demo seeds.
Loading
Loading