Repository navigation
TML-3607: Field presets are removed, and each is written with a type constructor or type alias that stores the same contract - #30845
Merged
Merged
Conversation
Every preset has a replacement that stores the same contract, proved by a parity test before removal. SQLite gains sql.Char(n), because no SQLite type constructor wrote sql/char@1. A PSL preset call is refused with its exact rewrite. The option, number and object argument kinds, the select template and their text parsers go with the presets. Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
The parity test moves beside parity/, which reads every directory as a fixture case. The upgrade fragments D10 listed shipped in 8.0.0-rc.19, so the new fragment overrides their advice instead of editing them. Counts, the base commit and the sql.Char test locations are updated. Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…reset stores what its replacement stores sql.Char(length) joins sql.String(length) in the type constructors each SQL target contributes, so SQLite can write the sql/char@1 columns the identifier presets stored. A table-driven integration test emits each preset and its replacement, in PSL and TypeScript, on Postgres, SQLite and Mongo, and asserts equal contracts and hashes; the replacements' contracts are committed under expected/. Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…Postgres facade exports type PSL fixtures, PSL in test strings, TypeScript contracts, query fragments, the prisma init templates, examples and test fixtures now write the type constructor, type alias and generator attributes that replace each field preset, as the slice 3 spec tables give them. No emitted contract changes. Tests that test the preset machinery itself keep their presets until the steps that remove it. @prisma/orm-postgres/contract-builder exports type beside field and gen, so a query fragment declares field.column(type.Timestamptz()). The Mongo temporal-presets integration folder is now temporal-generators, and its shared fixture is written with @onCreate(now()) and @onUpdate(now()). The preset replacement parity model Numeric is now NumericColumn, because a model named Numeric collides with the Numeric type constructor when the contract is printed as PSL. Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Code samples and recommendations in ADRs 181, 258 and 259, the subsystem docs, the scalar types and error references, the package READMEs and the prisma-8 skill references now write type constructors, type aliases and generator calls instead of field presets, and the query fragment samples import type from the Postgres facade. Text that documents the preset API or its design stays until the presets are removed. Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
The binder reads only authoring.type, so a preset call no longer resolves. Each family describer names the removed preset and the rewrite built from its arguments, as PSL_UNRESOLVED_REFERENCE. SQL and Mongo PSL lose preset resolution and its diagnostics. Mongo renames PSL_PRESET_ON_VARIANT_FIELD and PSL_PRESET_CONFLICT to PSL_GENERATOR_ON_VARIANT_FIELD and PSL_GENERATOR_CONFLICT. The parity test now checks that each PSL preset is refused and that its rewrite stores the replacement contract. Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…generated Removes the preset helpers from the SQL and Mongo TypeScript builders, field.generated, and the @internal/ids spec helpers that bundled a column type with a generator. The generator-phase-set-twice and default-set-twice messages no longer name a field preset. The parity test keeps only the TypeScript replacements, and type tests in the Postgres, SQLite and Mongo facades show the removed helpers are gone and the replacements take the same create and update input. Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…hat still contributes authoring.field is refused The fieldPreset descriptor kind, authoring.field, every target and family preset map, the temporal preset builders, the option, number and object argument kinds, the select template node, AuthoringArgRef path and default, and the PSL text parsers are removed. temporal-presets.ts is renamed temporal-type-aliases.ts for what stays. The control stack and composePackAuthoringNamespace throw CONTRACT.PACK_CONTRIBUTION_INVALID for a component that sets authoring.field, naming typeAlias as the replacement. The language server loses its non-value argument labels. The framework vocabulary threshold drops to 219. Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
….field moves to type constructors and type aliases The second half of the framework and pack removal: the control stack, data type assembly, the contract argument types, the PSL argument reader, the SQL family and the Postgres, SQLite and Mongo targets no longer read presets; tests drop their field fixtures and number arguments. The control stack and composePackAuthoringNamespace refuse authoring.field. The framework vocabulary threshold drops to 219. 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]>
…e authoring.field refusal Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…eset Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…nd a field imported outside a callback 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]>
ADR 275, the Data Contract doc, the error reference and the remove-field-presets upgrade guide hold the long-lived content. Follow-ups are TML-3705, TML-3706 and TML-3707. Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…ead of the removed uuidString preset Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
Main moved each database's packages into one folder per database. Field preset files this branch deleted stay deleted at their new paths, and files it added land at the new paths. Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…eset namespace Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
… required and an optional one is optional Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…always value, and cites the Data Contract doc for empty type parameters Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…Ids, and its tests again cover an uncalled type constructor and calls the binder refuses Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…l in @default, and a second type constructor call on one field Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…hich the refusal of a removed preset follows Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…lookup and message in psl-parser, and each family keeps only its table Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…s one path as both an entity and a type alias Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
… field, and match field.json() only in a file that names the Postgres builder Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…nit starter Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…d helpers throws CONTRACT.FIELD_HELPER_UNKNOWN with its rewrite Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…ntracts from the bundle-size example Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…ames from the SQL contract package, and skip a name the schema declares Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…or length check on an alias Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…ipt, the UuidString name, a hidden top-level alias, native Uuid on Postgres 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]>
…build, so its diagnostic is not hidden by a relation error Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
… a contributed namespace Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
… no type is reported, and namespaced suggestions are sorted Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…ovider does, so a field with no type keeps only the parser diagnostic Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…-remove-presets Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> # Conflicts: # pnpm-lock.yaml # test/integration/package.json
…ite member, and suggestions sort with compareStrings Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…-remove-presets Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> # Conflicts: # docs/architecture docs/ADR-INDEX.md # docs/reference/codec-authoring-guide.md # docs/reference/scalar-types.md # gotchas.md # packages/3-targets/postgres/1-target/README.md # packages/3-targets/postgres/1-target/src/core/authoring.ts # packages/3-targets/postgres/1-target/src/core/errors.ts # packages/3-targets/postgres/1-target/test/authoring-field-presets.test.ts # packages/3-targets/postgres/1-target/test/type-constructors.test.ts # skills/prisma-8/references/contract.md # skills/prisma-8/references/debug.md # test/integration/test/temporal-defaults/_fixture-now/contract.prisma
…te and time types Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…akes 307 Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…hows the alias rewrites Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…akes 309 Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…g rewrite Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…lias store what Char(26) stores Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
… refusal tables read their codec from it, and names say what they hold Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
…-remove-presets Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> # Conflicts: # docs/architecture docs/ADR-INDEX.md
wmadden
approved these changes
Oct 27, 2026
wmadden-electric
added a commit
to prisma/web
that referenced
this pull request
Oct 27, 2026
Rewrite every Prisma ORM 8 page that showed a PSL or TypeScript field preset with the type constructor or type alias that replaces it (prisma/orm#30845). Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
This was referenced Oct 27, 2026
wmadden-electric
added a commit
that referenced
this pull request
Oct 27, 2026
Type choices keep the option argument kind; everything else only presets used is gone. The removed-preset rewrites and main's new code use the explicit type names. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
opensource-fork-sync Bot
pushed a commit
to cla7aye15I4nd/opensource-prisma__orm
that referenced
this pull request
Oct 27, 2026
`8.0.0-rc.20` → `8.0.0-rc.21`. See [versioning](https://github.com/prisma/orm/blob/main/docs/oss/versioning.md). **Merging this PR ships the release.** The push to `main` carries the new root version. The `Publish to npm` workflow then publishes `8.0.0-rc.21` under the `latest` dist-tag and creates a pre-release GitHub Release. ## What to review - **Release notes:** [`docs/releases/v8.0.0-rc.21.md`](https://github.com/prisma/orm/blob/release/8.0.0-rc.21/docs/releases/v8.0.0-rc.21.md), mirrored in `CHANGELOG.md`. Eleven breaking changes: client members reject instead of throwing, the enum value question, MongoDB names and options, one set of MongoDB contract rules, `close()` with your own pool, `markerLocation`, the renamed PostgreSQL date and time types, ISO 8601 text date and time values with `DateStyle=ISO` required, and a Prisma 7 `@default(now())` filled on create (from prisma#30834), the control API checking a database's marker against the migration graph itself (from prisma#30866), and field presets removed in favour of type constructors and type aliases (from prisma#30845). prisma#30834, prisma#30866 and prisma#30845 merged after this branch was cut; `main` is merged in. It also covers the MySQL preview packages and the corrected rc.19 and rc.20 upgrade guides (prisma#30855). The notes leave out prisma#30848, prisma#30854 (docs-sync tooling) and prisma#30852 (docs only). - **Upgrade guides:** `skills/prisma-8/upgrading/{app,extension}/upgrades/8.0.0-rc.20-to-8.0.0-rc.21/instructions.md`, assembled from the fourteen pending fragments. The app guide has 31 changes plus the Supabase restamp, and the extension guide has 29. None was dropped. The originals are archived unchanged under `upgrade-instructions/releases/8.0.0-rc.20-to-8.0.0-rc.21/sources/`. While assembling, I fixed a wrong import path (`@prisma/orm-target-mongo/pack` does not exist), a detection that matched only code that was already upgraded, and a miscount of optional fields. - **Version bump:** every `package.json`, `pnpm-lock.yaml` (workspace specifiers only), the skill's `library_version`, and the Supabase contract version stamps. ## Checks run locally - `check:upgrade-coverage --mode publish --prev v8.0.0-rc.20 --head HEAD`: pass - `check:release-notes --mode pr`: pass - `lint:skills`: pass - `test/upgrade-instructions`: 86 files, 1650 tests pass The docs PR in prisma/web follows once this is published. Agent: rochester-20 --------- Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
ShivanshTiwari01
pushed a commit
to ShivanshTiwari01/web
that referenced
this pull request
Nov 7, 2026
…c.22 (prisma#8583) * docs(docs): update the Prisma ORM 8 pages for 8.0.0-rc.21 Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> * docs(orm): address review comments and document rc.21 date and time type changes Fix five review findings (db sign wording, variant field names, closed-client rejections, enum stored-value changes, pg.Client end). Document prisma/orm#30834: renamed explicit date and time types, new TimestampJsDate, TimestampInstant and IntervalString types, ISO 8601 text values, DateStyle=ISO, and the Prisma 7 @default(now()) filled on create. Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> * docs(orm8): MIGRATION.MARKER_MISMATCH explains its cause and gives recoveries; no page recommends a reset Document prisma/orm#30866 for 8.0.0-rc.21: the Drift section shows the new error, its meta, and the db update and migrations-only recoveries. Pages that told readers to drop or reset a database now point at db update or db migrate. Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> * docs(docs): show the off-graph migration error as the CLI prints it Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> * docs(orm): field presets are removed in 8.0.0-rc.21 Rewrite every Prisma ORM 8 page that showed a PSL or TypeScript field preset with the type constructor or type alias that replaces it (prisma/orm#30845). Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> * docs(docs): address review on the rc.21 Prisma ORM 8 pages - A binding with a pg pool or client is yours to close, as a pg option is. - After db update moves the db ref, plan from the newest migration to keep the change. - db migrate accepts a marker a migration starts or ends at. - Retesting an edited migration with db update --to <dir>^ works only for schema changes. - The recoveries from MIGRATION.MARKER_MISMATCH need no reset but can still drop data. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> * docs(docs): PSL reference for 8.0.0-rc.22: convenience date and time types, value object and discriminator checks, merged MongoDB indexes, Postgres extensions Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> * docs(docs): a PostgreSQL DateTime reads a JavaScript Date in 8.0.0-rc.22, and the Prisma 7 reader reads every @db type Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> * docs(docs): reference pages read a DateTime as a Date, with codec pg/timestamptz-date@1 Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> * docs(docs): replace the removed temporal.UpdatedAtString alias, and document the TypeScript convenience date types and extension() Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> * docs(docs): contract infer writes the convenience date and time types, read as a Date Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> * docs(docs): upgrade, Vercel and Clerk guides read a DateTime as a Date Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> * docs(docs): extension packs declare their Postgres extension, contract emit writes their files, and a citext pack Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> * docs(docs): declare a Postgres extension in the contract, the citext pack, and the value object and discriminator checks Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> * docs(docs): contract emit writes pack files and refuses old value objects; db sign and db verify check declared extensions Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> * docs(docs): MySQL reads through the ORM and the SQL builder Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> * docs(docs): connect() is safe to call again, and mongoStatic builds MongoDB pipelines without a client Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> * docs(docs): every @prisma/orm-* library is installed once, or RUNTIME.MULTIPLE_ORM_COPIES Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> * docs(docs): move the Prisma ORM 8 version numbers to 8.0.0-rc.22 and the CLI's to 8.0.0-rc.29 Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> * docs(docs): address the second review on the rc.21 and rc.22 Prisma ORM 8 pages Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]> * docs(docs): mark the preset note's version as history Co-Authored-By: Claude Opus 5.5 <[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]> Co-authored-by: Claude Opus 5.5 <[email protected]>
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
Before this PR, a Prisma 8 schema could write a field with a field preset, a single call that set the column type, the identity and the generated values at once:
After this PR, field presets no longer exist. The same fields are written with the type constructors, type aliases and attributes the rest of a schema already uses:
Ulidis a new type alias forChar(26), the column a ULID is stored in. The id and the foreign key use the same alias, so nobody writes the length 26. The new form stores exactly the same contract, so the storage and execution hashes do not change. A user only rewrites the calls; nothing is re-emitted, signed again or migrated.The same holds in TypeScript:
field.id.ulid()becomesfield.column(type.Ulid()).id().onCreate(gen.ulid()).The decision
ADR 275 decided to remove field presets. This PR, the third and last for TML-3607, carries that out:
@onCreate,@onUpdate), and TML-3607: Type aliases can set @onCreate and @onUpdate, and the contract stores the real column type instead of the alias name #30819 let type aliases carry those attributes, adding the ready-made aliasestemporal.CreatedAtandtemporal.UpdatedAt.Presets were a second way to write what attributes already say, with their own argument forms such as the bare
nowinonCreate: now. Their authors also paired a column codec with a generator by hand, which once wrote a JavaScriptDateinto a text column. Attributes and aliases cover the same ground, and any user can write them.A type alias for each generated identifier
Identifier presets were the main reason presets existed: a user wrote
id.ulid()and never needed to know a ULID is stored inChar(26). So this PR adds a type alias for each identifier column. ADR 310 explains the design.UuidStringChar(36)@onCreate(uuid())or@onCreate(uuid(7))UlidChar(26)@onCreate(ulid())NanoidChar(21)@onCreate(nanoid())Cuid2Char(24)@onCreate(cuid(2))KsuidChar(27)@onCreate(ksuid())@idand its generator itself.sql.Ulidand so on, on Postgres, SQLite and MySQL. Postgres also has them as top-level names, like its other column typesCharandUuid. In TypeScript they aretype.Ulid()andtype.sql.Ulid().model mixin UlidId { id Ulid @id @onCreate(ulid()) }, then+UlidId. The upgrade guide shows it, with the TypeScript constantconst UlidId = field.column(type.Ulid()).id().onCreate(gen.ulid());.Uuid @id @onCreate(uuid(7))is the recommended form, and theprisma initPostgres TypeScript starter now uses it.What a user sees
PSL refuses every preset with its exact rewrite. For example:
On SQLite the rewrite is
sql.Ulid @id @onCreate(ulid()). On Postgres, a schema that declares its ownmodel Ulidgets thesql.Ulidform, because its model hides the top-level name.The refusal is shown in a schema with relations. Before, a field whose type did not resolve was dropped, and the contract build then threw a relation error, such as
CONTRACT.RELATION_INVALID: Relation "User.posts" joins on column "id" ..., which hid the real diagnostic. Now field resolution records every field it drops, and the build stops before it runs. The user sees the refusal with its rewrite. This applies to any unresolved field type, not only presets.An unknown bare type name suggests the name in a namespace. On SQLite,
UlidgivesCannot find type "Ulid". Did you mean sql.Ulid?.TypeScript refuses a preset twice. It is a compile error, because the helper no longer exists. If a contract still calls one at run time, for example through
contract emitbeforetsc, the read throwsCONTRACT.FIELD_HELPER_UNKNOWNwith the same rewrite. Before this, the user gotCannot read properties of undefined. The run-time check answers only the removed preset names and adds nothing to the public types.An extension that still contributes presets is refused. A pack with an
authoring.fieldnamespace fails withCONTRACT.PACK_CONTRIBUTION_INVALID, and the message says to contribute a type alias instead.A new SQL type constructor,
sql.Char(length), on every SQL target. SQLite stored its identifier presets as a fixed-length text column but had no way to write that type. Nowsql.Char(36)works on Postgres, SQLite and MySQL.The upgrade guide is
upgrade-instructions/pending/remove-field-presets/, for apps and for extension authors. It has a before-and-after table for every preset in every target and both TypeScript builders. It opens by saying which advice from the 8.0.0-rc.19 guide no longer holds.What was removed
fieldPresetdescriptor kind, theauthoring.fieldnamespace, and every preset map in the SQL family, Postgres, SQLite and MongoDB.field.generated(...)and the@internal/idshelpers that bundled a column type with a generator.option,numberandobjectargument kinds, theselecttemplate, and the two text parsers only those used. Only thevalueargument kind remains.projects/remove-field-presets/folder, now that the project is done. Its long-lived content moved into ADR 275's amendment, ADR 310 and the Data Contract doc.How it was checked
Char(n).fixtures:checkshows no contract change across the repository.prisma init,contract print, and every example in the guide.prisma initstarter writes no preset, and a test pins its contract hashes. The Postgres TypeScript starter's storage hash changes, because its ids move to the nativeuuidcolumn. This affects only new projects./drive-code-reviewand two rounds of manual QA; every in-scope finding is fixed.TimestamptzTemporal,TimestampTemporal) broke two files inexamples/prisma-8-demo. They are updated with the rename only.The framework vocabulary check counts SQL and MongoDB words inside
packages/1-framework. This PR lowers that count from 236 to 218. It adds two counted lines: theprisma inittemplates now writefield.column(...). Those templates were already SQL code inside the framework CLI. Moving them out needs a new framework interface, which is TML-3702.Follow-ups
prisma inittemplates out of the framework CLI.temporal.UpdatedAthas no form with a precision, and a nanoid of another size has no alias.type.*helpers, so it cannot use contributed aliases. MongoDB TypeScript users writefield.date().onCreate(gen.now()).onUpdate(gen.now()).model Ulid { id Ulid @id }, fails with an error that does not mention the name clash.type.Ulid()on SQLite, fails with a rawtype.Ulid is not a function.Foo(3).Alternatives considered
prisma inittemplate text into files the vocabulary check skips. Not chosen: that would hide the lines from the check without moving the SQL code out of the framework. TML-3702 tracks the real move.Closes TML-3607.
Agent: frankenstein-64