Drizzle ORM multiple schemas #2127
Replies: 1 comment 1 reply
-
i have follow you but when drizzle generate sql, for relationship it fix with schema name "public" |
Beta Was this translation helpful? Give feedback.
-
i have follow you but when drizzle generate sql, for relationship it fix with schema name "public" |
Beta Was this translation helpful? Give feedback.
-
Since I've seen multiple issues popping up related to multiple schemas using Drizzle and since I'm using multiple schemas on a project I'm developing, then I've created the following repository to showcase how to do it: https://github.com/iursevla/nestjs-drizzle-multiple-schemas (special thanks to @frenzzy for the dynamic schema idea)
Related to Drizzle ORM I have the following:
abstract.dao
shows a way to abstract some commonly reused queries, e.g.,Note: I'm using a UUID id as PK for the table I'm showing in this showcase, but you can change it to whatever you want.
This repository also shows many other things but mostly related to NestJS.
Beta Was this translation helpful? Give feedback.
All reactions