is there a way to set a non primitive field as uni...
# orm-help
s
is there a way to set a non primitive field as unique ?
r
Hey @stephan 👋
s
hi Ryan
thank you for replying
r
It is not possible to set a non-primitive field as unique from the schema. Could you try by adding it to the database and then via introspect and see if it works?
s
what do you mean via introspect ?
r
Creating your table by setting a unique constraint in the database and then running
prisma introspect
s
ah, i understand but you are talking about code first am i right ?
r
I was talking about this method.
👍 1
s
tnx