Luxaritas
Luxaritas
Explore posts from servers
DTDrizzle Team
Created by Anthony on 11/19/2024 in #help
Double 'where' clause in dynamic query overriding the original 'where' clause not combining
This is intentional - to compose the final query you’ll need to combine all applicable conditions into an array and pass it to where once
2 replies
DTDrizzle Team
Created by bennettcohen on 11/18/2024 in #help
Shared db across services
Submodule, private package, and monorepo are all good options. You could also consider using introspection on one of the two projects with the other being the source of truth where you handle the migrations
2 replies
DTDrizzle Team
Created by MC_2018 on 11/15/2024 in #help
How to delete multiple db entries at once?
inArray is the function you’re looking for!
2 replies
DTDrizzle Team
Created by Huijiro on 11/2/2024 in #help
Can I re-use my Prisma Migrations on Drizzle?
Naturally that won’t let you “resume” from any point in history either, as drizzle-kit won’t be aware of which of those migrations have been applied already
6 replies
DTDrizzle Team
Created by DoggeSlapper on 10/28/2024 in #help
Drizzle d1 client seems to be missing
Haven’t used pnpm, but IIRC it symlinks too a global location. I wonder if there’s a way to force remove that global copy? Or any other copy it has cached?
12 replies
DTDrizzle Team
Created by DoggeSlapper on 10/28/2024 in #help
Drizzle d1 client seems to be missing
Weird! Sorry to hear the issue but glad it’s working now
12 replies
DTDrizzle Team
Created by J_Storm on 10/29/2024 in #help
Issue with importing drizzle from drizzle-orm
Maybe there's some other dependency relationship that's causing that? Not familiar with pnpm specifically. I would suggest manually specifying a newer version and see if that helps.
9 replies
DTDrizzle Team
Created by J_Storm on 10/29/2024 in #help
Issue with importing drizzle from drizzle-orm
(That said 0.33.0 doesn't immediately appear to have a difference here as far as what it exports)
9 replies
DTDrizzle Team
Created by J_Storm on 10/29/2024 in #help
Issue with importing drizzle from drizzle-orm
That is outdated - latest is 0.35.3
9 replies
DTDrizzle Team
Created by J_Storm on 10/29/2024 in #help
Issue with importing drizzle from drizzle-orm
Also just to check, is that error showing when you run your app? Or is it coming from typescript, a linter, etc
9 replies
DTDrizzle Team
Created by J_Storm on 10/29/2024 in #help
Issue with importing drizzle from drizzle-orm
Can you confirm the exact version of drizzle-orm you have installed?
9 replies
DTDrizzle Team
Created by Budi on 10/27/2024 in #help
How to keep dev and production DBs in sync?
The errors you posted above seem to indicate something else went wrong (it’s quite surprising to me that you’d see a syntax error on one DB but not the other if there both running equivalent Postgres versions!)
8 replies
DTDrizzle Team
Created by Budi on 10/27/2024 in #help
How to keep dev and production DBs in sync?
I'm lacking an understanding of the workflow I should use to separate my local dev migrations vs. my production ones.
You shouldn’t need to, unless I’m missing something about your use case. The idea is that when you go to do some development, you run migrate to get your local DB to the same state as prod (or whatever branch you’re working on), then you make drizzle schema changes, generate new migrations, migrate your local DB, and test. Then when you’re code gets merged, you migrate to apply any new migrations in that merge in the same way you migrated in your development environment - you started in the same state, ran the same code, and ended in the same state
8 replies
DTDrizzle Team
Created by DoggeSlapper on 10/28/2024 in #help
Drizzle d1 client seems to be missing
According to npm, the d1 folder is included: https://www.npmjs.com/package/drizzle-orm?activeTab=code Have you tried removing and reinstalling in case it got corrupted somehow?
12 replies
DTDrizzle Team
Created by Anthony on 10/28/2024 in #help
Race condition executing a common pattern (select or insert)
Postgres does not have a mechanism to upsert workout some form of unique index. If you really need to let it not be unique, you probably need to use manual locking, a semaphore table, etc
4 replies
DTDrizzle Team
Created by Tamarah on 10/25/2024 in #help
Error while running migrations
If that pops up again, do post here and I can take a look!
7 replies
DTDrizzle Team
Created by Tamarah on 10/25/2024 in #help
Error while running migrations
I think we actually discussed this yesterday - just remove the “driver” key from your drizzle config. You don’t need it for mysql2!
7 replies
DTDrizzle Team
Created by Tamarah on 10/23/2024 in #help
Migration generation error
Shouldn't
32 replies
DTDrizzle Team
Created by Tamarah on 10/23/2024 in #help
Migration generation error
I'll also note I'm using node v20.17.0 if that matters for some reason
32 replies
DTDrizzle Team
Created by Tamarah on 10/23/2024 in #help
Migration generation error
Yeah so the status is: - with [email protected] and [email protected] - with driver removed from drizzle.config.js - with schema changed to "./models/schema.js" in drizzle.config.js Running drizzle-kit generate works
32 replies