npm / prisma
prisma
What changed in prisma 6 to 7, from its official release notes, upgrade guides and advisories. Also covers @prisma/client. Sources checked 2026-10-17.
prisma 7283 changes
Breaking changes 91
Automatically batched calls now reject every missing record with P2025 instead of resolving later misses to undefined.
PostgreSQL deadlocks with SQLSTATE 40P01 are now reported as P2034 transaction write conflicts.
Previously unhandled SQLite result codes now become typed database errors instead of raw driver errors.
Invalid Date values now throw PrismaClientValidationError instead of a generic error.
db pull, db push, and migrate dev now report a consistent datasource error for empty or generator-only schemas.
The complete SQLITE_BUSY family now maps to socket timeout errors while preserving numeric extended result codes where available.
Destructive Prisma commands are refused when an AI agent is detected unless the user gives explicit consent.
Invalid Date values now fail fast with a validation error instead of being serialized as null.
The migrate-reset tool is removed from the prisma mcp server because resetting a database is destructive.
Unmapped driver-adapter database errors now surface as PrismaClientKnownRequestError with the original code and message.
A rolled-back migration still present on disk is now reported as unapplied instead of up to date.
Invalid Date values now fail fast with a validation error instead of being serialized as null.
The XOR type helper now rejects primitive values at compile time instead of accepting values that fail at runtime.
Savepoint operations now silently no-op with debug logging instead of executing SQL statements.
AccelerateEngine has been removed; Accelerate now uses RemoteExecutor.
The adapter setting has been removed from Prisma config.
The BinaryEngine and its long-running executable binary mode have been removed.
Driver adapters inherit connection pool settings from the underlying Node.js database driver, which may differ from Prisma ORM v6 defaults.
DataProxyEngine has been removed.
datasource.directUrl has been removed as unnecessary.
datasource.url is now configured in the Prisma config file instead of schema.prisma.
Migration connections previously supplied through directUrl must now be supplied as url in prisma.config.ts.
Creating Prisma Client now requires a driver adapter for all databases.
For prisma-client-js, the edge runtime path now uses /edge instead of /wasm.
The engine setting with js or classic values has been removed from Prisma config.
The Prisma CLI no longer automatically loads environment variables; developers must load them explicitly.
Prisma ORM now ships as an ES module, requiring projects to configure package and TypeScript module settings.
The react-native generator runtime value has been removed.
The LibraryEngine and its Node-API client engine mode have been removed.
Generated TypeScript enum values use schema names instead of mapped database values, matching Prisma ORM v6 behavior.
The deprecated metrics preview feature has been fully removed.
MongoDB is not supported in Prisma 7; MongoDB users should remain on Prisma 6.
Node.js 20.19.0 is the minimum supported version for Prisma ORM v7.
Generated Client runtime and project types now require an output path in schema.prisma.
The prisma package.json block for schema and seed configuration has been removed.
Projects consuming Prisma ORM as ESM need to set the package type to module.
Prisma Postgres projects now use the @prisma/adapter-pg driver adapter when constructing Prisma Client.
The Prisma-specific environment variable PRISMA_CLI_QUERY_ENGINE_TYPE was removed.
The Prisma-specific environment variable PRISMA_CLIENT_ENGINE_TYPE was removed.
The Prisma-specific environment variable PRISMA_CLIENT_NO_RETRY was removed.
prisma-client-js users using output must install this runtime utilities package.
Generated Prisma Client must now be imported from the configured custom output path.
The --schema flag was removed; the schema path must be configured in prisma.config.ts.
The --url flag was removed; the database connection must be configured in prisma.config.ts.
The --local-d1 flag has been removed; local D1 uses config datasource settings instead.
The undocumented --url flag has been removed from prisma db pull.
The --skip-generate flag was removed from prisma db push.
Database seeding must now be invoked explicitly with prisma db seed.
Prisma no longer runs generate implicitly after installation or migration.
The --accelerate flag has been removed from prisma generate.
The --allow-no-models flag has been removed from prisma generate.
The --data-proxy flag has been removed from prisma generate.
The Prisma-specific environment variable PRISMA_GENERATE_DATAPROXY was removed.
The Prisma-specific environment variable PRISMA_GENERATE_IN_POSTINSTALL was removed.
The --no-engine flag has been removed from prisma generate.
The Prisma-specific environment variable PRISMA_GENERATE_NO_ENGINE was removed.
The Prisma-specific environment variable PRISMA_GENERATE_SKIP_AUTOINSTALL was removed.
The deprecated prisma introspect command has been removed.
The --skip-generate flag was removed from prisma migrate dev.
The --skip-seed flag was removed from prisma migrate dev.
The --from-schema-datasource option was removed and replaced by --from-config-datasource.
The local D1 diff flags were removed and replaced by config datasource flags.
The schema-datamodel diff flags were removed and replaced by the corresponding schema flags.
The schema-datasource diff flags were removed and replaced by config datasource flags.
The URL diff flags were removed and replaced by config datasource flags.
The --from-url option was removed and replaced by --from-config-datasource.
The --shadow-database-url option was removed; configure the shadow database URL in prisma.config.ts.
The --to-schema-datasource option was removed and replaced by --to-config-datasource.
The --to-url option was removed and replaced by --to-config-datasource.
prisma migrate reset no longer automatically runs seed scripts.
The Prisma-specific environment variable PRISMA_MIGRATE_SKIP_GENERATE was removed.
The Prisma-specific environment variable PRISMA_MIGRATE_SKIP_SEED was removed.
The Prisma-specific environment variable PRISMA_QUERY_ENGINE_BINARY was removed.
The Prisma-specific environment variable PRISMA_QUERY_ENGINE_LIBRARY was removed.
Prisma migrate no longer runs seed implicitly.
The Prisma-specific environment variable PRISMA_SKIP_POSTINSTALL_GENERATE was removed.
The client middleware API has been removed; Client Extensions are the replacement.
prisma.config.ts is now required for projects performing introspection or migration.
The driver adapter name changed from PrismaBetterSQLite3 to PrismaBetterSqlite3.
Creating PrismaClient now requires either a driver adapter or accelerateUrl.
PrismaClient no longer accepts the datasources option.
PrismaClient no longer accepts the datasourceUrl option.
Calling PrismaClient without constructor arguments is no longer supported.
Calling PrismaClient with an empty options object is no longer supported.
The driver adapter name changed from PrismaD1HTTP to PrismaD1Http.
The driver adapter name changed from PrismaLibSQL to PrismaLibSql.
The driver adapter name changed from PrismaNeonHTTP to PrismaNeonHttp.
ReactNativeEngine has been removed.
Invalid SSL certificates are no longer ignored by default when Prisma ORM v7 uses node-pg.
TypeScript 5.4.0 is the minimum supported version for Prisma ORM v7.
Hardcoded URL validation was removed; users must avoid sensitive information in config files.
Security 8
Deserialized Bytes values now own standalone ArrayBuffers instead of exposing unrelated contents from Node.js's shared Buffer pool.
The AI-agent safety checkpoint now also covers interactive confirmations involving data-loss warnings.
The AI-agent safety checkpoint now covers interactive confirmations involving data-loss warnings, not only invocations using --accept-data-loss.
Studio now binds to 127.0.0.1 and restricts browser origins, preventing network clients or malicious websites from accessing database endpoints.
Resolves a security advisory in a transitive Prisma CLI dependency to prevent false positives from security scanners; no urgent action is required.
The Prisma Platform credentials file and directory now use restrictive permissions so OAuth tokens are not world-readable.
The AI safety checkpoint now also guards db push --accept-data-loss.
Potential vulnerabilities in installed Prisma CLI dependencies are fixed.
Deprecations 3
The datasource directUrl field is deprecated and should be configured in Prisma Config.
Datasource connection fields are deprecated in the schema and should be configured in Prisma Config.
The older prisma-client-js provider is deprecated and will be removed in a future Prisma ORM release.
New APIs and options 52
Result-extension compute callbacks receive the current model name as a typed second argument, preserved across composed extensions.
The MariaDB adapter accepts an existing mariadb pool, with optional disposal through disposeExternalPool.
A compatibility package enables Prisma 7 CLI and configuration alongside Prisma 8 in the same project.
The Prisma 7 executable is available as prisma7 for version-specific commands such as generate, migrate dev, and db push.
Prisma 7 now prefers version-specific configuration files, allowing its configuration to coexist with Prisma 8 configuration files.
Prisma Studio can visualize Prisma Next migration history with timelines, schema diffs, SQL statements, and model changes.
Prisma now provides shell tab completions for commands, subcommands, options, flags, and option values.
Prisma Compute is available in public beta for deploying long-lived TypeScript applications near Prisma Postgres.
prisma init installs the Prisma agent skills catalog in freshly scaffolded projects, with an option to opt out.
Studio adds a dedicated stream browser with aggregations, diagnostics, routing-key browsing, and WAL-history handoff.
Studio adds an optional Queries view backed by query-insights snapshots.
Adds fine-grained control over the query plan cache, including disabling it with 0.
New interactive command sequences Prisma Postgres setup, including initialization, linking, dependency installation, migration, generation, and seeding.
Supports supplying an API key for non-interactive bootstrapping in CI.
Supports supplying a database identifier for non-interactive bootstrapping in CI.
Supports selecting a starter template when bootstrapping a project.
Prisma Studio can copy one or more rows as CSV or Markdown.
Prisma Studio can generate SQL statements from natural-language requests using AI.
Prisma Studio can use natural language and AI to generate SQL statements for database inspection.
Prisma Studio supports editing multiple cells and prompts users to save or discard changes.
The constructor now accepts connection strings directly for improved ergonomics.
Adds a command that connects a local project to a Prisma Postgres database.
Allows custom prepared statement name generation so users can leverage pg statement caching.
Adds a constructor option to choose between text and binary protocols.
Studio in Console now supports AI-generated filters.
Prisma Studio adds a cmd+k command palette for performing most actions by keyboard.
Prisma Studio now supports searching across database tables and cells.
Prisma Studio now allows selecting multiple database cells at once.
Prisma Studio filtering now includes an option to use raw SQL filters.
Prisma Studio adds an SQL sidebar tab for running raw SQL queries against database data.
Interactive transaction clients can now use $transaction to create nested transactions.
Supports a where argument on field-level @unique declarations for partial indexes.
Adds partial index support behind the partialIndexes preview feature for PostgreSQL, SQLite, SQL Server, and CockroachDB.
The client generator supports fast and small query compiler builds; fast is the default, while small reduces size with a speed tradeoff.
Adds a -url flag for more flexible connection configuration.
Adds a -url flag for more flexible connection configuration.
Adds a -url flag for more flexible connection configuration.
Adds a SQL commenter plugin to support query insights metadata.
Adds a PrismaClient option for configuring SQL commenter plugins that append metadata to SQL queries.
Adds query tag plugins and async-context helpers for attaching arbitrary metadata to queries.
Adds a plugin that appends W3C Trace Context metadata for distributed tracing correlation.
Adds a plugin type for creating custom SQL commenter metadata plugins.
datasource.shadowDatabaseUrl is now configured in the Prisma config file.
The D1 adapter provides listLocalDatabases to configure local D1 database connections.
The @map attribute can now be used on enum members to set their runtime values.
NODE_EXTRA_CA_CERTS can configure database certificate authorities for Prisma ORM v7.
SQLite projects can use the @prisma/adapter-better-sqlite3 driver adapter.
Prisma Studio can inspect a remote database using the --url flag.
Prisma Studio can inspect remote databases by passing a --url flag.
Prisma Config is now the default place for configuring database URLs, schema location, migrations, and seed scripts.
A serverless client library supports edge runtimes, streaming results, pipelined queries, parameterized SQL, transactions, and batch operations.
A serverless client library supports edge and serverless runtimes, streaming results, pipelining queries, and transactions.
Performance 8
Fluent-relation field maps are now built lazily and linearly; non-fluent queries no longer construct them.
Field maps are constructed lazily and in linear time, and non-fluent queries no longer build them, reducing ordinary query setup overhead.
Query plans now eagerly perform one unconditional database operation and synchronously interpret remaining pure operations while keeping cached plans immutable.
Plans with one unconditional database operation are evaluated eagerly and remaining pure plan steps are interpreted synchronously; cached plans remain immutable.
Restoring the OmitOpts generic default lets tsc reuse cached type instantiations, reducing type-checking time on large schemas.
Prisma Client now caches compiled query plans for repeated query shapes, reducing compiler overhead and event loop contention.
Raw queries can bypass the query compiler and interpreter infrastructure, sending them directly to the driver adapter to reduce overhead.
The new prisma-client provider uses the Rust-free client, with faster queries, smaller bundles, and fewer deployment resources.
Behavior and default changes 27
MariaDB connection strings now support bracketed IPv6 addresses.
MySQL connection strings now support bracketed IPv6 addresses.
Remote query events now share matching spans and traces, record errors as span exceptions, and continue logging when tracing is unavailable.
Prisma Postgres Serverless now prefers named constraints and falls back to parsed field names for unique violations.
Chunked statements now execute atomically in a transaction and roll back if a later chunk fails.
Version output now includes the resolved Prisma CLI package path, helping diagnose global-versus-local installation issues.
JSON version output now includes the resolved Prisma CLI package path.
Without an explicit config option, Prisma 7 searches version-specific config locations before falling back to existing prisma.config.* files.
Windows engine binaries are cached in a stable user-level directory instead of a cwd-relative node_modules cache.
Freshly scaffolded projects receive version-relevant Prisma agent skills, and installation is best-effort.
Missing driver adapter errors now include a copy-pasteable example and a link to the driver adapters documentation.
MariaDB statement caching is disabled by default to address a reported leak.
Prisma schema parsing now streams with automatic fallback for extremely large intermediate strings exceeding V8 limits.
SQL databases now support nested transaction rollbacks through savepoints, including rollback of inner transactions when an outer transaction fails.
Allows a missing datasource URL and validates it only when needed.
Interactive transactions can now batch multiple queries.
Surfaces DataMapperError as a user-facing error for clearer, more actionable error reporting.
Tailors generated setup based on whether the runtime is Bun or another JavaScript runtime.
@opentelemetry/api is treated as an external dependency during instrumentation, preventing duplicate copies in applications.
Reports an additional error when constructing PrismaClient without configuration arguments.
The engines check is relaxed so Node.js 25+ users can adopt Prisma, although Node.js 25+ is not considered stable.
prisma db seed now shows an informative message when no migrations.seed command is configured.
Prisma Studio now sorts tables alphabetically.
Prisma Studio warns when the SQLite file does not exist.
Prisma Accelerate now serves as a dedicated caching layer while Prisma Postgres provides connection pooling natively.
With native Prisma Postgres pooling, Prisma Accelerate now serves as a dedicated caching layer.
The Rust-free ESM Prisma Client is now the default provider for new projects.
Tooling 10
Generation can offer a one-time, opt-in installation of Prisma's agent skills, with environment skips, a timeout, and no generation failure.
Studio's Query Details view now provides copy actions.
Studio SQL execution, linting, and navigation now resolve unqualified identifiers against the selected schema.
Prisma Studio links records to related records in referenced tables for easier database traversal.
Relaxes the version constraint to ^8.16.0 for compatibility with newer PostgreSQL type definitions.
@types/pg is now a direct adapter-pg dependency, improving the out-of-the-box TypeScript experience.
Adds support for object expressions and object members in the schema reformatter.
Prisma Studio now supports Deno >= 1.4 <2.2 and Bun >= 1.
The Prisma CLI now includes the new Prisma Studio with relationship visualization and remote database inspection.
TypeScript projects need bundler module resolution to consume Prisma's ES modules.
Fixes and other changes 84
Combining chunked results containing hundreds of thousands of rows no longer causes call-stack overflows.
CLI commands tolerate corrupt, unreadable, or unwritable state files through reinitialization, atomic writes, and in-memory fallback.
Date values created in other JavaScript realms, including iframes, jsdom, and vm contexts, are now handled correctly.
Interactive transaction cleanup during disconnect now handles transactions whose driver-level startup is still in progress.
Invalid Date values now throw PrismaClientValidationError instead of a generic error.
Fluent relation queries now work when relation fields are named select or include.
Rendering very large parameter lists and combining huge chunked results no longer causes call-stack overflows.
Rendering very large parameter lists no longer causes call-stack overflows.
The prisma-client generator now infers module format from the nearest package.json type for node16 and nodenext projects.
Nested-write unique constraint errors now identify the violating model, including models using @@map and @@schema.
PostgreSQL RESTRICT violations with SQLSTATE 23001 are now reported as P2003 with an available field or constraint name.
The PostgreSQL adapter now preserves database constraint names in P2002 unique constraint violations.
Cleanup failures after transaction timeout or backend termination no longer become unhandled promise rejections.
Uint8Array values created in other JavaScript realms, including iframes, jsdom, and vm contexts, are now handled correctly.
Timed-out interactive transactions now issue ROLLBACK before returning connections to the pool, preventing leaked transaction state.
PostgreSQL primary-key constraint renames are rendered as separate ALTER TABLE statements to avoid multi-change migration errors.
Setting nullable Bytes fields to null now sends VarBinary parameters instead of implicitly typed nvarchar values.
Reading Bytes columns no longer emits Node.js DEP0005 deprecation warnings.
Reading Bytes columns no longer emits Node.js DEP0005 deprecation warnings.
P2022 errors now parse quoted and unquoted PostgreSQL column names, including identifiers containing spaces.
Schema-loading commands no longer hang on symlink cycles or report duplicate files reached through alternate paths.
PostgreSQL introspection now preserves sequence defaults returned in schema-qualified form.
Corrects the P2029 database parameter limit check so over-limit queries are handled accurately.
PostgreSQL JSON list equality filters no longer panic or emit invalid ::jsonb casts.
Enum values with custom database names are now parameterized correctly.
Case-insensitive JSON field filtering now works correctly with mode: insensitive.
Migration replay now supports PostgreSQL CREATE INDEX CONCURRENTLY statements outside transaction blocks.
Corrects a misleading error message that referenced the removed --shadow-database-url flag.
Restores required SQL Server VARCHAR casts for parameterized values.
ColumnNotFound errors now correctly extract column names from quoted and unquoted PostgreSQL error messages.
createMany queries are no longer cached, avoiding cache bloat and potential Node.js crashes during bulk operations.
The new prisma-client generator now exports this groupBy payload type for TypeScript usage.
NowGenerator is lazy, avoiding synchronous Date calls that caused Next.js dynamic usage errors in cached components.
adapter-mariadb now uses the binary MySQL protocol, fixing lossy number conversions.
DateTime fields no longer return Invalid Date in some cases when using unixepoch-ms timestamps.
Cursor-based pagination now works correctly with @db.Date columns.
Partial index predicate comparison now handles quoted and unquoted identifiers correctly, preventing needless index recreation.
Partial unique indexes are excluded from DMMF unique metadata, preventing incorrect findUnique input type generation.
Manual partial indexes are preserved when the partialIndexes preview feature is disabled, avoiding unnecessary migration drops and additions.
Prisma.DbNull no longer serializes as an empty object in some bundled environments such as Next.js.
Fixed query plan mutation that caused cursor queries to break.
Fixed a case-insensitive IN filter regression.
Fixed MySQL joins that relied on non-strict equality.
Fixed a case-insensitive NOT IN filter regression.
Fixed partial index predicate comparison on PostgreSQL and MSSQL.
Updated text column detection to check for a binary collation.
Corrected relationJoins compatibility checks for MariaDB 8.x versions.
Fixed array parameter wrapping in push operations.
Fixed Uint8Array serialization in nested JSON fields.
Fixes a regression affecting cursor-based pagination when using parameterised values.
Adds missing JSON value deserialization for JSONB parameter fields.
Handles null values in type parsers for nullable columns.
Preserves Prisma.skip when query extension arguments are cloned.
Applies result extensions correctly to nested and fluent relations.
Prevents BigInt precision loss in JSON aggregation for MySQL and CockroachDB by casting BigInt values to text.
PostgreSQL migration scripts now permit usage of CREATE INDEX CONCURRENTLY in migrations.
Connection strings now properly URL-decode non-ASCII database names, preventing connection failures.
MSSQL connection string parsing now handles curly brace escaping for passwords containing special characters.
PlanetScale adapter now properly propagates silent transaction commit failures.
SQL Server adapter serializes commit and rollback operations to resolve EREQINPROG race condition errors.
Mapped enums revert to Prisma 6.19.0 behavior, so generated enum values no longer come from the value passed to @map.
Mapped enums again follow the v6.19.0 behavior instead of taking generated enum values from the value passed to @map.
The adapter pins a better-sqlite3 version to avoid an SQLite 3.51.0 bug; users should upgrade to v7.3.0.
The adapter pins a safer better-sqlite3 version to avoid an underlying SQLite 3.51.0 bug; users should upgrade to v7.3.0.
BigInt values in JSON aggregation are returned as JSON strings, preserving full precision when parsed in JavaScript.
BigInt values in JSON aggregation are returned as JSON strings, preserving full precision when parsed in JavaScript.
Improves Postgres adapter error handling for invalid-text-representation errors.
Fixes byte upsert behavior by removing a legacy byte-array representation path.
Prevents issues when multibyte UTF-8 characters are split across chunk boundaries during line processing.
Allows certain workflows to proceed even when URLs are undefined.
Emits machine-readable JSON cleanly to stdout without extra noise.
Resolves issues related to Studio connections, improving reliability for VS Code or language-server integrations.
Allows the env helper's type definition to work with interface-based generics without an index signature.
Treats the peer dependency as external during instrumentation to prevent duplicate bundled copies.
Fixes TypeScript issues involving client runtime utilities in pnpm monorepos.
Adds compatibility with Prisma 7 for the read-replicas extension.
The read-replicas extension now supports Prisma 7 and can be installed at its latest version.
Prisma updates the underlying better-sqlite3 version to fix a reported issue.
cockroachdb support is restored in the prisma-client-js generator.
The exit code regression affecting prisma migrate diff is fixed.
Prisma Studio no longer has collisions between user and internal columns when querying.
Prisma Studio fixes issue 1363.
The prisma.config.ts file must be placed at the project root.
Prisma no longer shims WeakRef in Cloudflare Workers, avoiding unexpected memory leaks.
prisma 619 changes
Breaking changes 2
Prisma v7 preparation moves the generator provider from prisma-client-js to prisma-client.
Projects can define their datasource directly in prisma.config.ts; any datasource in schema.prisma is ignored.
New APIs and options 9
The datasource key is available in prisma.config.ts ahead of Prisma v7.
The engine key is available in prisma.config.ts ahead of Prisma v7.
Prisma Postgres connection strings can enable connection pooling with pool=true.
Unified Prisma Config is available for project configuration ahead of Prisma v7.
Prisma Postgres Console now shows total egress, average response size, and average query duration.
prisma.config.ts supports js or classic engine types, with classic required for Prisma v7.
A new env helper function can be imported from prisma/config for configuration values.
Prisma supports multiple instances configured with different providers.
prisma init now creates a prisma.config.ts file automatically for new projects.
Behavior and default changes 2
Naming conventions for fields and relation fields are aligned.
Bytes maps to Uint8Array depending on the TypeScript version.
Tooling 2
Generated client files now include Biome ignore comments.
The VS Code extension supports using a local Prisma Postgres database without logging in.
Fixes and other changes 4
Fixes Prisma Accelerate support in some edge runtime configurations when the @prisma/client/edge entrypoint is not being used.
Fixes incorrectly reported empty diffs caused by a diffing bug introduced in Prisma 6.13.1.
Dropping a model no longer appends the default schema to the migration.
An empty previewFeatures suggestion now results in an empty array value.