I've been following a tutorial series (Wes Bos's A...
# orm-help
j
I've been following a tutorial series (Wes Bos's Advanced-React course) and when I most recently tried to deploy some changes, I've been getting the error "One field of the type
User
must be marked as the id field with the
@id
directive." but I have version 1.17.1 of prisma installed and before we just had to have "id: ID! @unique" and I'm not sure what changed.
s
Where are you deploying to, and what is the version of the server? The datamodel has changed with the prisma versions. Either you have to change your datamodel, or you should change the prisma version on the server 🙂
Are you using the development server on prisma?
d
I’ve also just come across this issue.
I get that in the case you suggested you can just change @unique to @id to resolve the issue but does that keep that field unique?
Ah, [with @id] “the field becomes the primary identifier of the type. It implies that this field is unique.” In your case, I guess just change @unique to @id.
j
The version of the server is 1.32.0-beta. How do I change the version of prisma on the server?
s
I don’t think you can change the development server on prisma, which I suppose it is in your case. I’ve taken the same course, and you use this one until the last chapter (deployment). I would actually suggest you look up the docs for the newer versions of prisma, and adjust your datamodel!
@Darryl You’re right 🙂