Dan
Explore posts from serversDTDrizzle Team
•Created by Dan on 7/26/2023 in #help
Postgres + WITH sql
I'm trying to do the following sql:
It returns a list of missing ids in the database. I have it done like this:
Is there a way to do it more object friendly by using
db.$with
and db.with(name)....
? The presence of VALUES seems there might not be any helpers for this.1 replies
DTDrizzle Team
•Created by Dan on 6/17/2023 in #help
How to do migrations that require data changes?
Hi, how can I migrate a live database that requires to do a more complicated data shuffling, e.g. I have this schema:
If I do this change:
It will need more than drizzle-kit is providing, e.g. update query to map existing data to new data. Is drizzle-kit able to handle this case by providing additional code/sql and if not does it mean that I need to do it manually and then reset drizzle snapshots to be able to continue with drizzle-kit from there?
5 replies