Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
@unique and @index can't be used together - Prisma
P
Prisma
•
17mo ago
•
3 replies
Satish
@unique and @index can't be used together
If I
'm using
@@unique([id1, id2])
@@unique([id1, id2])
I cannot use
@@index([id1, id2])
@@index([id1, id2])
That
's because
@
@unique already means indexed
?
?
Prisma
Join
The official Discord server of Prisma! Find us online at prisma.io
9,819
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Unique index w/ nullable field in unique query
P
Prisma / help-and-questions
2y ago
Unique index with nullable composite key?
P
Prisma / help-and-questions
2y ago
prisma-client provider can't be used with multiple generators
P
Prisma / help-and-questions
11mo ago
Can't Null a Compound-unique Value
P
Prisma / help-and-questions
8mo ago