-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.kind/bugA reported bug.A reported bug.tech/enginesIssue for tech Engines.Issue for tech Engines.topic: introspectiontopic: native database typestopic: schema validation
Milestone
Description
Bug description
When introspecting the timestamp[] or time[] type in Postgres, they become:
DateTime[] @db.Timestamp
DateTime[] @db.Time
which breaks client generation.
How to reproduce
create table types (
timeStampList timestamp[],
timeList time[]
);npx @prisma/cli@dev introspectmodel types {
timeStampList DateTime[] @db.Timestamp
timeList DateTime[] @db.Time
}npx @prisma/cli@dev generateEnvironment variables loaded from ./prisma/.env
Prisma Schema loaded from prisma/schema.prisma
Error: Schema parsing
error: Function "Timestamp" takes 1 arguments, but received 0.
--> schema.prisma:71
|
70 | nl Bytes[] @db.ByteA
71 | ol DateTime[] @db.Timestamp
|
error: Function "Time" takes 1 arguments, but received 0.
--> schema.prisma:73
|
72 | pl DateTime[] @db.Date
73 | ql DateTime[] @db.Time
|
Validation Error Count: 2
Expected behavior
model types {
timeStampList DateTime[] @db.Timestamp
timeList DateTime[] @db.Time
}Environment & setup
Environment variables loaded from ./prisma/.env
@prisma/cli : 2.10.0-dev.74
@prisma/client : 2.10.0-dev.58
Current platform : darwin
Query Engine : query-engine 77abecc4840127ebdcc02b83ee1e2c9cc27009f2 (at ../../../../../.npm/_npx/6106/lib/node_modules/@prisma/cli/query-engine-darwin)
Migration Engine : migration-engine-cli 77abecc4840127ebdcc02b83ee1e2c9cc27009f2 (at ../../../../../.npm/_npx/6106/lib/node_modules/@prisma/cli/migration-engine-darwin)
Introspection Engine : introspection-core 77abecc4840127ebdcc02b83ee1e2c9cc27009f2 (at ../../../../../.npm/_npx/6106/lib/node_modules/@prisma/cli/introspection-engine-darwin)
Format Binary : prisma-fmt 77abecc4840127ebdcc02b83ee1e2c9cc27009f2 (at ../../../../../.npm/_npx/6106/lib/node_modules/@prisma/cli/prisma-fmt-darwin)
Studio : 0.304.0
Preview Features : nativeTypes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.kind/bugA reported bug.A reported bug.tech/enginesIssue for tech Engines.Issue for tech Engines.topic: introspectiontopic: native database typestopic: schema validation