This repository was archived by the owner on Aug 25, 2026. It is now read-only.
Commit 4a5d152
Add migrations-showcase example and fix false literal defaults
Two changes that together produce a rich, replayable 20-migration
history for migration-aware tooling:
- Fix contract canonicalization dropping literal false / empty-array
column default values. isDefaultValue() treats false and [] as
omittable shape defaults, but a default literal payload is data —
dropping it produced a contract.json that failed its own structural
validation on the next read (surfaced as PN-CLI-4003 when planning a
migration for a `Boolean @default(false)` column).
- Add examples/migrations-showcase: 20 cumulative schema snapshots of a
project tracker (models, enums, relations, indexes, uniques, plus a
destructive column drop and a retired model) and a generate script
that runs the real emit → migration plan → migrate flow per step
against a Postgres database, then captures prisma_contract.marker and
prisma_contract.ledger (including contract_json_before/after) into
fixture/prisma-contract.json for downstream demos.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Søren Bramer Schmidt <sorenbs@gmail.com>1 parent e1508fb commit 4a5d152
173 files changed
Lines changed: 123204 additions & 20 deletions
File tree
- examples/migrations-showcase
- fixture
- migrations/app
- 20260702T2236_add_projects
- 20260702T2236_add_tasks
- 20260702T2236_init_users
- 20260702T2236_task_priorities
- 20260702T2236_user_profiles
- 20260702T2237_add_activity_log
- 20260702T2237_add_attachments
- 20260702T2237_add_comments
- 20260702T2237_add_milestones
- 20260702T2237_add_tags
- 20260702T2237_add_teams
- 20260702T2237_drop_task_done_flag
- 20260702T2237_hot_path_indexes
- 20260702T2237_project_settings
- 20260702T2237_project_soft_delete
- 20260702T2237_retire_activity_log
- 20260702T2237_task_due_dates
- 20260702T2237_task_status
- 20260702T2237_unique_user_email
- 20260702T2237_user_presence
- refs
- prisma
- scripts
- steps
- packages/1-framework/0-foundation/contract
- src
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
0 commit comments