Database features matrix

This page gives an overview of the features which are provided by the databases that Prisma supports. Additionally, it explains how each of these features can be used in Prisma with pointers to further documentation.

Relational database features

This section describes which database features exist on the databases that are currently supported by Prisma. The Prisma schema column indicates how a certain feature can be represented in the Prisma schema and links to its documentation. Note that database features can be used in Prisma Client even though they might not yet be representable in the Prisma schema.

Note: If a feature is not supported natively by the database, it's also not available in Prisma.

Constraints

ConstraintPostgreSQLSQL ServerMySQLSQLitePrisma schemaPrisma ClientPrisma Migrate
PRIMARY KEY✔️✔️✔️✔️@id and @@id✔️✔️
FOREIGN KEY✔️✔️✔️✔️Relation fields✔️✔️
UNIQUE✔️✔️†✔️✔️@unique and @@unique✔️✔️
CHECK✔️✔️✔️*✔️Not yet✔️Not yet
NOT NULL✔️✔️✔️✔️?✔️✔️
DEFAULT✔️✔️✔️✔️@default✔️✔️

Deletion behaviors (for foreign key references)

Deletion behaviorPostgreSQLSQL ServerMySQLSQLitePrisma schemaPrisma ClientPrisma Migrate
CASCADE✔️✔️✔️✔️Not yet✔️Not yet
RESTRICT✔️✔️✔️✔️Not yet✔️Not yet
NO ACTION✔️✔️✔️✔️Not yet✔️Not yet
SET DEFAULT✔️✔️✔️✔️Not yet✔️Not yet
SET NULL✔️✔️✔️✔️Not yet✔️Not yet

Update behaviors (for foreign key references)

Update behaviorPostgreSQLSQL ServerMySQLSQLitePrisma schemaPrisma ClientPrisma Migrate
CASCADE✔️✔️✔️✔️Not yet✔️Not yet
RESTRICT✔️✔️✔️✔️Not yet✔️Not yet
NO ACTION✔️✔️✔️✔️Not yet✔️Not yet
SET DEFAULT✔️✔️✔️✔️Not yet✔️Not yet
SET NULL✔️✔️✔️✔️Not yet✔️Not yet

Indexes

IndexPostgreSQLSQL ServerMySQLSQLitePrisma schemaPrisma ClientPrisma Migrate
UNIQUE✔️✔️✔️✔️@unique and @@unique✔️✔️
WHERE✔️✔️✔️✔️Not yet✔️Not yet
USING✔️✔️✔️✔️Not yet✔️Not yet

Algorithm specified via USING:

Index type (Algorithm)PostgreSQLSQL ServerMySQLSQLitePrisma schemaPrisma ClientPrisma Migrate
B-tree✔️✔️✔️✔️Not yet✔️Not yet
Hash✔️✔️✔️✔️Not yet✔️Not yet
GiST✔️✔️NoNoNot yet✔️*Not yet
GIN✔️✔️NoNoNot yet✔️*Not yet
BRIN✔️✔️NoNoNot yet✔️*Not yet
SP-GiST✔️✔️NoNoNot yet✔️*Not yet

* Only available if natively supported by database.

Misc

FeaturePostgreSQLSQL ServerMySQLSQLitePrisma schemaPrisma ClientPrisma Migrate
Autoincrementing IDs✔️✔️✔️✔️autoincrement()✔️
Arrays✔️NoNoNo[]✔️*✔️*
Enums✔️No✔️Noenum✔️*✔️*
Native database types✔️✔️✔️✔️Not yet✔️Not yet
SQL Views✔️✔️✔️✔️Not yetNot yetNot yet
Authorization and user management✔️✔️✔️NoNot yetNot yetNot yet
JSON support✔️✔️✔️No✔️*✔️*✔️*
Fuzzy/Phrase full text search✔️✔️✔️NoNot yetNot yetNot yet
Table inheritance✔️✔️NoNoNot yet✔️*Not yet

* Only available if natively supported by database.

Edit this page on GitHub