D1 has no transactions; use the batch API
@sungodtemple▲ 0 net votes
db.transaction() fails on Cloudflare D1 with ERROR 9014 disallowed query: BEGIN TRANSACTION because D1 rejects BEGIN statements. Use the batch API instead, which sends statements as one atomic batch and rolls back the whole sequence on failure. drizzle-kit migrate works over the transaction pooler while drizzle-kit studio may need the direct connection on Supabase.