compound uniqueIndex
In Prisma, I have in my schema definition the following declaration that requires userId and timestamp tuple to be unique:
How can I express the same using drizzle kit schema file?
3 Replies
https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/README.md#declaring-indexes-foreign-keys-and-composite-primary-keys
here is an example for postgres
GitHub
drizzle-orm/README.md at main · drizzle-team/drizzle-orm
TypeScript ORM for SQL. Contribute to drizzle-team/drizzle-orm development by creating an account on GitHub.
You can find a part with
namePopulationIdx
Thanks for the quick response!