Skip to content

TML-3468: Close the project Storage a model does not map - #30704

Merged
wmadden-electric merged 1 commit into
mainfrom
tml-unmapped-storage-closeout
Oct 13, 2026
Merged

wmadden-electric merged 1 commit into
mainfrom
tml-unmapped-storage-closeout

Conversation

@wmadden-electric

@wmadden-electric wmadden-electric commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

At a glance

This PR removes projects/unmapped-storage/, the planning files of the project "Storage a model does not map". Its four slices have merged, and its decisions live in ADR 267 (#30641). It also corrects one stale phrase in the Prisma 7 source project's slice 1 spec: an @ignore field used by an index is now kept, not refused.

Merge this after ADR 267 (#30641), because the project's done conditions include that ADR, and after #30705, which makes the code match what ADR 267 says about a model with no fields.

What the project delivered

Slice PR Outcome
1 #30665 A contract definition can hold columns and tables no model maps, lowered by the same code as a model's table.
2 #30667 The SQL ORM reads and writes only the columns a model's fields map; naming any other column throws ORM.FIELD_UNKNOWN.
3 #30672 The Prisma 7 reader keeps @ignore fields and @@ignore models as columns and tables, so adding or removing @ignore after the handover plans nothing.
4 #30671 Prisma 7's _prisma_migrations table is left out of introspection, so db verify --strict passes on a database Prisma 7 built.

Done conditions

  • Adding @ignore to a field and @@ignore to a model in examples/prisma7-adoption plans no operations, and so does removing them. Met: examples/prisma7-adoption/test/handover.test.ts.
  • The handover test asserts strict verify reports nothing unclaimed. Met: same file, after every edit.
  • findMany() with no select returns no extra column, and create with its name throws ORM.FIELD_UNKNOWN. Met: test/integration/test/sql-orm-client/unmapped-storage.test.ts.
  • ADR 267 is merged. Open: #30641 awaits review.
  • The Prisma 7 project's slice 1 text no longer says ignored objects are omitted. Met by slice 3, plus the phrase corrected here.

Where the deferred items went

  • Many-to-many on.targetFields holds junction column names: TML-3570.
  • Whether validator tests may build malformed contracts by hand: TML-3571.
  • A model with no fields types its rows as accepting any key: fixed in #30705 (TML-3536), because ADR 267 states the fixed behaviour. Its review found TML-3572 (the SQL ORM builds inputs from the row type), TML-3573 (Mongo contracts built without emitting) and TML-3574 (other empty maps in emitted types).
  • Prisma 8 syntax for unmapped columns and tables, the polymorphic integration test, and rebuilding buildMixedPolyContract through a source: TML-3469.
  • A relation to a bare model name used in two namespaces resolves by list order: TML-3280.
  • A junction declared only by a table node is refused: kept as designed, per ADR 267.
  • A cross-space foreign key carries the target model's name as well as its table: checked and kept; the name is real information about the target (TML-3569, cancelled).

Retro

  • Every path an upgrade instruction describes needs a test. The slice 3 spec first described the post-handover upgrade order wrongly, then claimed migrating was unsafe. Tests for each path (sign, migrate --advance-ref db, migrate then sign, sign-first recovery) showed the real behaviour, and the instruction and ADR were corrected from them.
  • Run the cross-cutting test families on a merge of main before queueing. Slices 2 and 3 each left the merge queue once. Tests on main had changed or been added after the PR's own CI: ported _count tests for slice 2, and print refusals plus Prisma 7 journeys for slice 3. Running the print round-trip and Prisma 7 CLI journey files after merging main would have caught both.
  • After merging a sibling slice, run the shared test file even when git merges it cleanly. Slices 3 and 4 both edited handover.test.ts. The merge was clean apart from one comment, but left a call to a helper slice 4 had renamed.
  • Approved means queue it at once. Slice 2 sat approved but not queued for hours.

Project: Storage a model does not map.

Agent: anansi-36

@wmadden-electric
wmadden-electric requested a review from a team as a code owner October 13, 2026 07:05
@coderabbitai

coderabbitai Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (9)
  • projects/prisma7-contract-source/slices/01-postgres-source/spec.md is excluded by !projects/**
  • projects/unmapped-storage/deferred.md is excluded by !projects/**
  • projects/unmapped-storage/design-notes.md is excluded by !projects/**
  • projects/unmapped-storage/plan.md is excluded by !projects/**
  • projects/unmapped-storage/slices/01-storage-in-the-definition/spec.md is excluded by !projects/**
  • projects/unmapped-storage/slices/02-orm-stays-in-the-domain/spec.md is excluded by !projects/**
  • projects/unmapped-storage/slices/03-prisma7-ignore-keeps-storage/spec.md is excluded by !projects/**
  • projects/unmapped-storage/slices/04-prisma7-ledger-is-a-tool-table/spec.md is excluded by !projects/**
  • projects/unmapped-storage/spec.md is excluded by !projects/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration
  • Configuration used: Repository: prisma/orm/.coderabbit.yml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ff6545c3-220f-471d-b2d0-26be896f58a0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@wmadden-electric
wmadden-electric added this pull request to the merge queue Oct 13, 2026
Merged via the queue into main with commit 9835012 Oct 13, 2026
20 checks passed
@wmadden-electric
wmadden-electric deleted the tml-unmapped-storage-closeout branch October 13, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants