Repository navigation
TML-3385: Plan the data types own column types project - #30518
Closed
wmadden-electric wants to merge 17 commits into
Closed
wmadden-electric wants to merge 17 commits into
wmadden-electric wants to merge 17 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…m the contract Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…d contracts Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…ript Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…ssion settles Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…and infer failure Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
… project Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…ite data types Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…their decisions Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Contributor
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (9)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
@prisma/orm-extension-arktype-json
@prisma/orm-extension-middleware-cache
@prisma/orm-extension-paradedb
@prisma/orm-extension-pgvector
@prisma/orm-extension-postgis
@prisma/orm-extension-supabase
@prisma/orm-family-mongo
@prisma/orm-family-sql
@prisma/orm-framework
@prisma/orm-mongo
@prisma/orm-postgres
@prisma/orm-sqlite
@prisma/orm-target-mongo
@prisma/orm-target-postgres
@prisma/orm-target-sqlite
@prisma/orm-toolchain
commit: |
Contributor
size-limit report 📦
|
wmadden-electric
added a commit
that referenced
this pull request
Oct 6, 2026
…on main The slice plan says the branch targets main and carries the documents of planning pull request #30518. The copy of the pull request description is deleted, and the design documents no longer link to the gitignored design verification. Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
wmadden-electric
added a commit
that referenced
this pull request
Oct 6, 2026
Each inventory header says it was made on 2026-09-29 for planning pull request #30518 and that its raw outputs were not kept, without the local paths or the commit not on main. The slice plan says the review artefacts are local. Design 3.1 names the PSL-only constructor sets and the targets' own sets, and 3.2 names the runtime adapter's create(stack). Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Contributor
Author
|
Closed in favour of #30547. Its project documents land with slice 1, in newer versions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
At a glance
Today a column's database type name lives in about eight places that can disagree. After this project, one declaration per data type holds it, and every tool reads that declaration:
A contract column then names its data type instead of storing a free string:
{ "codecId": "pg/timestamptz-temporal@1", "dataType": "pg/timestamptz", "typeParams": { "precision": 3 }, "nullable": false }With pgvector in the stack,
db verifyrecognises avector(1536)column by exact equality, andcontract inferprintspgvector.Vector(1536)instead ofUnsupported("vector(1536)").Linked issue
Refs TML-3385. Linear project: Data types own column types. Slice tickets, in order: TML-3386, TML-3388, TML-3387, TML-3389.
Summary
This pull request adds the plan for finishing ADR 254. It contains no code. The files are under
projects/data-types-completion/:spec.md: purpose, non-goals, requirements, definition of done.design.md: the exact design for all four slices, written so an implementer has nothing to decide.plan.md: slice order, dependencies, checks and halt conditions.design-notes.md: every decision with its reason, including the ones Will made.research.mdandinventory/: the survey of the code the design rests on, including output from a real Postgres and SQLite.reviews/design-verification.md: an independent review of the design against the code, whose findings are applied.Decision
packages/2-sql/1-core/contract. Targets and extensions declare types; no shared package does.targetTypes, the rendering hooks, the Postgres codec name hook, the introspection normalisers andcontract infer's hand-written type tables all go.nativeTypeleavescontract.jsonbefore 8.0 ships. Every SQL hash changes once. Users run an upgrade script, thendb signon each database.text,integer,real,blob, and the two character types. JSON, datetime and 64-bit integers are codecs of those types.contract inferfails on it rather than printingUnsupported(...).8in@default(nanoid(8))is checked by the same rule as a column default, using the argument building block from TML-3367.Slices
dataTypein the contract; SQLite corrected; upgrade script;db signover every contract spaceNotes for the reviewer
design-notes.md: the contract-format slice now comes before the verify slice, because SQLite would otherwise report drift on every column; and the upgrade script rehashes old snapshots instead of refusing them, becauseapps/telemetry-backendshows real projects have them.types {}alias of a type without parameters is no longer written as a quoted name. TodayVarCharbehind an alias writes"character varying", which Postgres rejects.Testing performed
None: documentation only.
pnpm lint:docspasses.Skill update
n/a: planning documents only. The slices update the codec authoring guide, the error reference and the upgrade instructions.
Checklist
git commit -s).TML-NNNN: <sentence-case title>form.Alternatives considered
nativeTypein the contract as a derived field. No hash would move, but the contract would keep two sources for one fact forever. Rejected by Will: 8.0 is the last point where the format can change without a major version.db sign, an existing command.sqlite/jsonstored assqlite/text). Rejected: a data type is what the database stores; the distinctions belong to codecs.Unsupported(...)for unknown types. Rejected: it is not a Prisma 8 type, socontract emitcannot read what infer printed.Agent: romulus-48