dj_klashndjksad
DTDrizzle Team
•Created by dj_klashndjksad on 10/26/2024 in #help
After commit hook for transactions
and delaying the queue invocation after a few seconds sounds just too unreliable
4 replies
DTDrizzle Team
•Created by dj_klashndjksad on 10/26/2024 in #help
After commit hook for transactions
It would be nice to have this at it would allow us to collocate this kind of logic, instead of invoking all the BullMQ queues later at once in the controller
4 replies
DTDrizzle Team
•Created by dj_klashndjksad on 10/26/2024 in #help
After commit hook for transactions
For example imagine simple scenario like this. But it could get way more complex.
4 replies
DTDrizzle Team
•Created by addamsson on 6/3/2024 in #help
Is there a way to do a "down" migration with Drizzle?
Hello, I just made this small lib today that adds
up
and down
in drizzle using some drizzle-kit internals, that they are using to make migrations work inside payloadcms. This is very early and work still in progress, but give it a try and maybe try to contribute too.
https://www.npmjs.com/package/@drepkovsky/drizzle-migrations?activeTab=readme18 replies
DTDrizzle Team
•Created by cosbgn on 1/25/2024 in #help
Why do I need to duplicate names in my schema?
You could have a separate naming conventions between your db layer and application layer (eg. camelCase for JS, snake_case for SQL).
Drizzle lets you have full control over it. In other ORMs where it is done automatically by some magical naming strategies implementations, it could get really frustrating having to think every time, just to get the naming right.
There can be many occasions when you want to do raw queries directly to your db. So to have the ability to know exactly what are the columns named in your db is just a big plus. You don't have to do any mental gymnastics around it.
I remember it was really painfull to write raw queries to DB schemas build upon typeorm or prisma (didn't know about the mapping option back then), because the naming wasn't so straightforward.
In my opinion, having the explicit control over your DB layer and APP layer naming is just something you could only benefit from in the long run.
2 replies