prisma-8

Use when working in a project that depends on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo (Prisma 8, formerly Prisma Next): editing contract.prisma or a contract.ts builder, running `prisma contract emit`, planning or applying migrations, editing migration.ts, writing db.orm / db.sql / db.query queries, wiring db.ts or middleware, integrating a build tool, using the Supabase extension or RLS, or reading a dotted error code such as MIGRATION.HASH_MISMATCH. Use when the user asks "what is Prisma 8", "where do I start", or compares it to another ORM. Use when the user asks to upgrade or bump Prisma 8 in an app or an extension package. Use when you see @internal/* or @prisma/orm-* imports, prisma.config.ts with definePrismaConfig, or contract.json / contract.d.ts. Do not use for Prisma ORM 7 or earlier (schema.prisma + @prisma/client).

Install
npx skills add 'https://github.com/prisma/orm/tree/main/skills/prisma-8'
Download bundle ↓
main · fac8604Scanned 2026-09-17

Contributors

GitHub-linked commit authors for this SKILL.md at the saved revision. Co-authors and history before file renames are not included.

File history ↗

upgrading/app/upgrades/0.10-to-0.11/instructions.md

upgrading/app/upgrades/0.10-to-0.11/instructions.mdBrowse 76 files
View on GitHub
← Back to SKILL.md

from: "0.10" to: "0.11" changes:

  • id: insert-single-row-wrap-in-array summary: Wrap single-row .insert({...}) call sites in an array — .insert([{...}]). The single-object overload is removed; .insert() now exclusively accepts an array of row objects. detection: glob: "**/*.{ts,tsx}" contains: - ".insert(" anyMatch: true

0.10 → 0.11 — User upgrade instructions

insert-single-row-wrap-in-array

Starting at the 0.11 release, the .insert() method on the SQL builder accepts only an array of row objects. The single-object overload that previously allowed .insert({ field: value }) is removed.

Before 0.11:

await runtime.execute(db.sql.user.insert({ email: 'alice@example.com' }).build());

Starting at 0.11:

await runtime.execute(db.sql.user.insert([{ email: 'alice@example.com' }]).build());

Walk every .ts / .tsx file matched by the detection.glob above. For each call site that passes a plain object directly to .insert(...), wrap the argument in an array:

  • .insert(row).insert([row])
  • .insert({ field: value }).insert([{ field: value }])

Variable references to a row object are safe to wrap directly:

// Before
for (const item of items) {
  await runtime.execute(db.sql.table.insert(item).build());
}
// After
for (const item of items) {
  await runtime.execute(db.sql.table.insert([item]).build());
}

If a call site already passes an array (.insert([row1, row2])), it is already correct — leave it unchanged.

TypeScript will flag bare-object call sites as type errors after the bump, providing a reliable compile-time signal for every affected site.

Validation

After applying the rule above, run pnpm typecheck && pnpm test (or your application's equivalent). The change is mechanical — every affected call site is flagged at compile time.