Anton Sidelnikov
Anton Sidelnikov
DTDrizzle Team
Created by Anton Sidelnikov on 10/27/2024 in #help
Migration production safety questions (concurrency, rollbacks, out-of-order application)
Hi David. I was lazy enough to spend time on actual deep tests really (not a blocker for me), but I think since migrator is a separate tool in drizzle, I would just write tool to do in proper way, it's not that hard. Gonna be for tool postgres. Ping you if published?
4 replies
DTDrizzle Team
Created by LUCKY on 10/25/2024 in #help
Run Raw SQL with sql``
@LUCKY That's await db.execute(".....") - you can run arbitrary queries with that. If you want to do some parameter embeddings, it's best to use it with sql operator you've mentioned like this:
import { sql } from 'drizzle-orm'
const id = 22
await db.execute(sql`select * from users where id = ${id}`) - that will handle safe escaping
import { sql } from 'drizzle-orm'
const id = 22
await db.execute(sql`select * from users where id = ${id}`) - that will handle safe escaping
2 replies
DTDrizzle Team
Created by Anton Sidelnikov on 10/27/2024 in #help
Migration production safety questions (concurrency, rollbacks, out-of-order application)
So far to me looks like those are not cases supported by Drizzle reliably, so I'm thinking about writing custom migrator to apply migrations. But looking for some guidance here since could miss a thing.
4 replies