Prisma Cloud id field invalid I’m having an issue ...
# orm-help
s
Prisma Cloud id field invalid I’m having an issue deploying my datamodel to Prisma Cloud (demo server). My id fields in my datamodel are all set to the type
id: ID! @id
. When I try deploying to Prisma Cloud, I get this error:
Copy code
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
Copy code
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.
Copy code
# prisma.yml
...
datamodel:
  - ${env.PRISMA_ROOT_DATAMODEL}
  - server/datamodel.prisma
Any ideas?
h
Hi @Steve Mason Demo server uses AWS Aurora(MySQL) internally so any mongo related deploys are not possible
s
Ahhh, that totally makes sense. Thank you!