bennettcohen
DTDrizzle Team
•Created by bennettcohen on 12/18/2024 in #help
Column not created even though appears in migration file
Hey team - I'm noticing a column that isn't created in my database, even though the schema + migration file clearly show that it is.
Setup:
- docker postgres running locally
- drizzle-kit: "^0.28.0"
- drizzle-orm: "^0.36.1"
I've confirmed it's in the migration file.
But then it does not appear in the database. Any tips for diagnosing this?
2 replies
DTDrizzle Team
•Created by bennettcohen on 11/20/2024 in #help
Migration Order Question
Hey team - I'm trying to understand migration order as I keep running into the annoying error
I separate my schema into different files below. Can someone explain how to fix this? Occurs for all my definitions. Thanks!
Interestingly enough, it seems like it's fine with organizationId, which has a similar setup.
1 replies
DTDrizzle Team
•Created by bennettcohen on 11/18/2024 in #help
Shared db across services
Hey folks - we have two services that need access to the same database (a client facing API and our web app). I don't really want to setup a monorepo. I think my best bet is to either setup a shared git submodule or a private npm package?
What's the best approach here for creating this + running migrations? Rn I'm literally copying and pasting code across the projects and want something a little more put together and in sync.
Thanks!
2 replies
DTDrizzle Team
•Created by bennettcohen on 7/11/2024 in #help
Type safety on .set() method?
Hey folks - I was wondering if there is a way to get type safety when updating a row using the .set method? In the example below,
updated_at
is the table name, not the property name updatedAt
. This code runs with no errors, but of course never updates the updated at because it doesn't exist!
Any tips for getting this to be type-safe ?12 replies