talira

Prisma ORM

One schema. Every query type-safe.

open sourceApache-2.0self-hostablefree

Prisma ORM is the TypeScript and Node.js ORM where you define your data model once in a schema file and Prisma generates a typed client, so every query, migration and type is checked against it. Its migrations refuse to run a change that would destroy data and say what it would have dropped. Prisma 7 works with PostgreSQL, MySQL, SQLite, MongoDB, SQL Server and CockroachDB. Prisma 8, a release candidate in November 2026, is a rewrite in native TypeScript with a minimal core and public extension interface (pgvector, PostGIS and other extensions build on it), first-class PostgreSQL and MongoDB support, and agent skills installed into projects for Claude Code, Cursor and other coding agents. It's Apache-2.0 licensed; its maker also sells Prisma Postgres and Prisma Compute.

Problems it solves

  • I want autocomplete and type errors for my database queries in TypeScript instead of raw SQL strings
  • define my database models once and get typed queries, migrations and types from the same file
  • a migration almost dropped a column with production data in it
  • generate and apply SQL migrations from changes to my data model
  • my ORM returns any and I find wrong field names only in production
  • load a user's posts with relations in one typed query without writing joins by hand
  • switch my Node.js app between Postgres and SQLite without rewriting queries
  • use MongoDB from TypeScript with a typed schema and queries
  • let my coding agent add a model and write the queries for it correctly
  • add vector similarity search or PostGIS geo queries through my ORM
  • introspect an existing database and get a typed client for it

Features

  • declarative schema file defining models, fields and relations
  • generated type-safe client with autocomplete for every model
  • migrations generated from schema changes, refusing destructive changes that would drop data
  • Prisma 7: PostgreSQL, MySQL, SQLite, MongoDB, SQL Server and CockroachDB providers
  • Prisma 8 (release candidate): native TypeScript rewrite with a public extension interface
  • official extensions for pgvector, PostGIS and ParadeDB (experimental)
  • npm create prisma scaffolds Next.js, Hono, Nuxt, Astro, NestJS, SvelteKit, TanStack Start or Elysia apps
  • agent skills (SKILL.md) installed for Claude Code, Cursor, Copilot Agent and Devin
  • Prisma 7 maintained on the v7 branch for eighteen months after 8.0.0 final

Limitations

  • Doesn't fully support SQLite, MySQL or MariaDB in Prisma 8 yet: they're proofs of concept, with PostgreSQL and MongoDB first-class

Capabilities

Has a command line toolplan not known
Takes pluginsplan not known

Alternatives

The same job

These do what Prisma ORM does.

  1. sqlc Compile SQL to type-safe code

Compare Prisma ORM with the top 3