Prisma breaking changes, updated weekly

Every verified Prisma trap in Footgun: changes and behaviors that break code or give wrong results, newest first. Each one has the error you see, the fix, and the date it was last checked. The list updates when the weekly check adds or retires a trap. For the full cause and sources, open the trap, or see all Prisma traps.

  1. fg-0286· added 2026-10-15· last checked 2026-10-15

    Prisma 7 error P1012: The datasource property `url` is no longer supported in schema files

    Symptom

    Error code: P1012

    Fix

    Remove url from the datasource block, set datasource.url in prisma.config.ts, and pass an adapter to PrismaClient. Projects staying on Prisma 6 should run the extension's 'Pin the current workspace to Prisma 6' command (extension 7.x), which sets prisma.pinToPrisma6.

  2. fg-0290· added 2026-10-15· last checked 2026-10-15

    @prisma/adapter-pg ignores ?schema= in the connection URL and queries the public schema

    Symptom

    The table `public.Item` does not exist in the current database.

    Fix

    Pass schema in the adapter options for model queries, and set search_path through the connection string options parameter so raw queries resolve too. Check that your pooler forwards startup options before relying on search_path through it.

  3. fg-0291· added 2026-10-15· last checked 2026-10-15

    prisma generate fails in CI or Docker builds with 'PrismaConfigEnvError: Cannot resolve environment variable: DATABASE_URL'

    Symptom

    Error: PrismaConfigEnvError: Cannot resolve environment variable: DATABASE_URL.

    Fix

    Import dotenv/config at the top of the config and read process.env directly, so generate runs without a URL while migrate commands still fail with a clear message.

  4. fg-0295· added 2026-10-15· last checked 2026-10-15

    Prisma through PgBouncer or the Supabase pooler fails with 'prepared statement "s0" already exists'

    Symptom

    prepared statement "s0" already exists

    Fix

    Give the CLI a direct connection and the client the pooled one. On Prisma 6, add pgbouncer=true to the pooled URL only for PgBouncer before 1.21 and configure max_prepared_statements on 1.21 and later; the Prisma 7 docs do not say whether @prisma/adapter-pg reads pgbouncer=true.

  5. fg-0296· added 2026-10-15· last checked 2026-10-15

    Queries hang or fail with 'Unable to start a transaction in the given time' after moving Prisma to driver adapters

    Symptom

    Transaction API error: Unable to start a transaction in the given time.

    Fix

    Set pool size and timeouts on the adapter explicitly.

  6. fg-0284· added 2026-10-15· last checked 2026-10-15

    JSON responses with Prisma results throw 'Do not know how to serialize a BigInt' or turn Decimals into strings

    Symptom

    TypeError: Do not know how to serialize a BigInt

    Fix

    Convert both at the API boundary with a replacer or explicit mapping.

  7. fg-0288· added 2026-10-15· last checked 2026-10-15

    Prisma 7: 'PrismaClient was instantiated without any options. A driver adapter is required'

    Symptom

    PrismaClient was instantiated without any options. A driver adapter is required to connect to your database.

    Fix

    Install the adapter for your database, pass it to the constructor, and import PrismaClient from the generated client folder set by the generator output, not from @prisma/client.

  8. fg-0285· added 2026-10-15· last checked 2026-10-15

    Next.js dev server runs out of database connections because each hot reload creates a new PrismaClient

    Symptom

    FATAL: sorry, too many clients already while running next dev

    Fix

    Cache the client on globalThis outside production.

  9. fg-0289· added 2026-10-15· last checked 2026-10-15

    Prisma 7 with @prisma/adapter-pg fails with P1010 or a certificate error on a database that worked with Prisma 6

    Symptom

    P1010: User was denied access on the database

    Fix

    Remove sslmode from the URL and give the adapter the provider's CA certificate. Turning verification off with rejectUnauthorized false works but skips the identity check.

  10. fg-0292· added 2026-10-15· last checked 2026-10-15

    prisma migrate dev in CI or against a shared database detects drift and wants to reset the schema

    Symptom

    Drift detected: Your database schema is not in sync with your migration history.

    Fix

    Use migrate deploy in CI, staging, and production, and keep migrate dev for local databases you can wipe.

  11. fg-0293· added 2026-10-15· last checked 2026-10-15

    prisma migrate dev on a managed database fails with 'permission denied to create database'

    Symptom

    A migration failed when applied to the shadow database

    Fix

    Create a separate empty database for the shadow and point shadowDatabaseUrl at it, never at the main database. In Prisma 7 the setting lives in prisma.config.ts.

  12. fg-0294· added 2026-10-15· last checked 2026-10-15

    Prisma rejects null for a Json field: Type 'null' is not assignable to type 'NullableJsonNullValueInput | InputJsonValue'

    Symptom

    Type 'null' is not assignable to type 'NullableJsonNullValueInput | InputJsonValue | undefined'.

    Fix

    Write Prisma.DbNull or Prisma.JsonNull, and filter with equals and Prisma.AnyNull. In Prisma 7 import Prisma from the generated client.

Have your agent check Prisma changes before it codes

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun