Bug description
When you have in your prisma schema enabled nativeTypes preview feature, running prisma generate or prisma introspect throws error:
Error: Schema Parsing P1012
Get config
error: The preview feature "nativeTypes" is not known. Expected one of:
--> schema.prisma:8
|
7 | url = env("DATABASE_URL")
8 | previewFeatures = ["nativeTypes"]
|
How to reproduce
Have schema like
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
previewFeatures = ["nativeTypes"]
}
model campaign {
id Int @id @default(autoincrement())
start_date DateTime @db.Date
}
and run
prisma generate
Expected behavior
Client should be generated.
I couldn't find any relevant documentation about nativeTypes feature so it's possible that I made some configuration wrong.
Environment & setup
@prisma/cli : 2.10.0
@prisma/client : 2.10.0
Current platform : darwin
Query Engine : query-engine af1ae11a423edfb5d24092a85be11fa77c5e499c (at node_modules/@prisma/cli/query-engine-darwin)
Migration Engine : migration-engine-cli af1ae11a423edfb5d24092a85be11fa77c5e499c (at node_modules/@prisma/cli/migration-engine-darwin)
Introspection Engine : introspection-core af1ae11a423edfb5d24092a85be11fa77c5e499c (at node_modules/@prisma/cli/introspection-engine-darwin)
Format Binary : prisma-fmt af1ae11a423edfb5d24092a85be11fa77c5e499c (at node_modules/@prisma/cli/prisma-fmt-darwin)
Studio : 0.304.0
Bug description
When you have in your prisma schema enabled nativeTypes preview feature, running
prisma generateorprisma introspectthrows error:How to reproduce
Have schema like
and run
prisma generateExpected behavior
Client should be generated.
I couldn't find any relevant documentation about
nativeTypesfeature so it's possible that I made some configuration wrong.Environment & setup