Skip to main content

@core/prisma

The @core/prisma plugin generates a Prisma schema from ZModel.

info

This plugin is always automatically included when zenstack generate is run. You only need to add it to your ZModel if you want to customize its options.

Installation

This plugin is built-in to ZenStack and does not need to be installed separately.

Options

NameTypeDescriptionRequiredDefault
outputStringOutput file path (relative to the path of ZModel)No./prisma/schema.prisma
generateClientBooleanWhether to run prisma generate after generationNotrue
formatBooleanWhether to run prisma format after generationNofalse

Example

/schema.zmodel
plugin prisma {
provider = '@core/prisma'
output = './src/prisma/schema.prisma'
format = true
}