How to fix P1015: Your Prisma schema is using features that are not supported for the version of the database in Prisma

PrismaINTERMEDIATEMEDIUMUpdated Dec 12, 2025· 196 views

Prisma throws P1015 when the schema asks for database features that the connected server version does not expose. The migration or introspection stops before generating SQL, and Prisma reports the exact version plus a list of the unsupported statements so you can align the schema with what the database actually supports.

Quick fix

Fixes P1015

npx prisma migrate dev
  1. Capture the P1015 output to see which features fail
  2. Confirm the actual database version and provider
  3. Match each unsupported feature with the Prisma feature matrix
  4. Upgrade the database or adjust the schema
prisma — error
npx prisma migrate dev
P1015: Your Prisma schema is using features that are not supported for the version of the database
shell
npx prisma migrate dev

What this error means

The query engine compares your schema with the capabilities declared by the database. When a field, index, constraint, or native type requires a feature that the current database version lacks, it raises P1015 along with metadata such as `database_version` and an `errors` list describing each unsupported element. This prevents Prisma from emitting DDL that would fail on the server and gives you a chance to adjust either the schema or the database version before applying migrations.

Typical symptoms

  • `npx prisma migrate dev` stops before creating the SQL, prints P1015, then lists the database version and the unsupported features under `Errors`.
  • `npx prisma db push` or `prisma db pull` fails immediately with the same message even though the connection itself succeeds.
  • The CLI output names specific schema constructs—`CHECK` constraints, `USING` indexes, or Postgres-only features—so you can see which lines of `schema.prisma` depend on newer capabilities.
  • The error occurs while you are adding new model attributes, native indexes, or preview features, not while running application queries.

Common causes

  1. You declared check constraints (via @@check or @check) while pointing Prisma to MySQL 5.6/5.7, and the feature matrix shows that CHECK constraints became available only in MySQL 8+.
  2. The schema defines Postgres-exclusive indexes (Gist/Gin/Brin) or `USING`/INCLUDE clauses but you are connected to MySQL/MariaDB or an older Postgres release that does not advertise those algorithms.
  3. Features such as EXCLUDE constraints, table inheritance, or other Postgres/SQL Server-specific behaviors are not supported by every connector, so Prisma reports them as unsupported when the server does not offer them.
  4. Preview features that rely on new database capabilities (for example, advanced indexes or JSON operators) are enabled while the target database version is still behind the required release.
  5. Managed providers (PlanetScale, Neon, etc.) intentionally limit DDL operations; if the database rejects a statement for a missing feature, Prisma surfaces the rejection via P1015.
  6. You introspected or migrated a schema that already included advanced declarations, and the target database could not honor those declarations because its version is not listed in the supported database table.

How to fix "P1015: Your Prisma schema is using features that are not supported for the version of the database"

1Capture the P1015 output to see which features fail

Re-run the command that triggered the error so you can copy the unmapped features. The most common commands are:

bash
npx prisma migrate dev

or

bash
npx prisma db push

The CLI will print a block like:

Database version: 5.7.40
Errors:
• Check constraints are not supported in this release.

Use that output to know exactly which schema elements the database refused.

2Confirm the actual database version and provider

Connect to the database and run the native version query so you can compare it to the supported-databases list:

sql
-- PostgreSQL
SELECT version();

-- MySQL/MariaDB
SELECT VERSION();

-- SQL Server
SELECT SERVERPROPERTY('ProductVersion');

If the value is older than the releases listed at https://www.prisma.io/docs/orm/reference/supported-databases, plan an upgrade or switch to a supported host.

3Match each unsupported feature with the Prisma feature matrix

Open https://www.prisma.io/docs/orm/reference/database-features and locate the feature rows for the offending items (CHECK constraints, USING indexes, EXCLUDE constraints, etc.). The table names the connector or version that supports each feature—for example, CHECK constraints are only available on MySQL 8+, and certain index algorithms are Postgres-only.

If the matrix marks a feature as “PostgreSQL only” or “Not yet” for Prisma Migrate, avoid using it or rework the schema to keep the unsupported constructs out of migrations.

4Upgrade the database or adjust the schema

If your database version is too old, plan an upgrade path (e.g., migrate MySQL 5.7 → 8.0) or move to a managed service that lists the version you need. When you control the schema, remove or replace the offending constructs:

- Drop the unsupported @@check definitions or enforce the rule in the application layer.
- Convert Gist/Gin/Brin indexes to B-tree indexes that your database already supports.
- Disable preview features that require newer engines until you can upgrade.

After making the change, rerun the migration command:

bash
npx prisma migrate dev

or

bash
npx prisma db push

Prisma should now proceed once the schema and database agree on the supported feature set.

Frequently asked questions

What does "P1015" mean?
The query engine compares your schema with the capabilities declared by the database. When a field, index, constraint, or native type requires a feature that the current database version lacks, it raises P1015 along with metadata such as database_version and an errors list describing each unsupported element. This prevents Prisma from emitting DDL that would fail on the server and gives you a chance to adjust either the schema or the database version before applying migrations.
How do I fix "P1015"?
Prisma throws P1015 when the schema asks for database features that the connected server version does not expose. The migration or introspection stops before generating SQL, and Prisma reports the exact version plus a list of the unsupported statements so you can align the schema with what the database actually supports.
What causes "P1015"?
You declared check constraints (via @@check or @check) while pointing Prisma to MySQL 5.6/5.7, and the feature matrix shows that CHECK constraints became available only in MySQL 8+. The schema defines Postgres-exclusive indexes (Gist/Gin/Brin) or USING/INCLUDE clauses but you are connected to MySQL/MariaDB or an older Postgres release that does not advertise those algorithms. Features such as EXCLUDE constraints, table inheritance, or other Postgres/SQL Server-specific behaviors are not supported by every connector, so Prisma reports them as unsupported when the server does not offer them.
Is the "P1015" error serious?
It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.

Official resources & further reading