how can i index a non-unique field in typescript p...
# orm-help
n
how can i index a non-unique field in typescript prisma schemas?
👀 1
or do i have to manually index them on the DB maybe, seems i can’t have two fields with @id in schema syntax
n
Hey Nick 👋 Could you please elaborate on what is your use case? It isn’t required that the fields on which you want to create an index should be unique, here’s a reference for defining index
v
👋 Hello @nick - did you have a chance to check Nurul's comment? Let us know if this is still an open question!
n
@Nurul @Vladi Stevanovic I’ve worked past it, I wanted to have a compound ID in addition to the primary ID but it appears you can’t?
a
@nick It is only possible to have either a composite ID or a single primary key. You can define multiple compound indexes, though.