Steve Mason
03/18/2019, 1:26 PMid: ID! @id. When I try deploying to Prisma Cloud, I get this error:
User
✖ The field `id` is reserved and has to have the format: id: ID! @unique or id: UUID! @unique.
If I change my datamodel to id: ID! @unique, it deloys to the cloud, but my local prisma client/db no longer works.
I’m using mongodb locally, does this make a difference? Here’s my prisma.yml
endpoint: ${env:PRISMA_CLIENT_ENDPOINT}
datamodel: server/datamodel.prisma
databaseType: document
secret: ${env:PRISMA_SECRET}
generate:
- generator: typescript-client
output: ./generated/prisma-client/
hooks:
post-deploy:
- prisma generate
I could programmatically include a different root datamodel with just the id types based on an env var, but that’s kinda weak I’d rather not if I don’t have to.
# prisma.yml
...
datamodel:
- ${env.PRISMA_ROOT_DATAMODEL}
- server/datamodel.prisma
Any ideas?Harshit
03/18/2019, 2:38 PMSteve Mason
03/18/2019, 3:02 PM