DT
Drizzle Teamsan4d
Error with Nested Transactions
I'm experiencing an issue with nested transactions on neon serverless 0.9.1, drizzle-orm 0.30.9, and ws 8.16.0.
The following works locally but not in production:
The following works in production but not locally:
I'd expect the 1st (parent-child transactions) to work. Instead, I get a 25P01 error
NO_ACTIVE_SQL_TRANSACTION
with message
error: ROLLBACK TO SAVEPOINT can only be used in transaction blocks\n at file:///var/task/dist/server/entry.mjs:148485:23\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async _NeonTransaction.transaction
D
Dan•12d ago
i'm experiencing very similar issues in a pretty different environment -- op-sqlite on iOS
I've seen both this error and "Cannot start a transaction within a transaction"
I'm not even intentionally using any nested transactions, all mine are single-level with a series of statements
S
san4d•12d ago
Hmm. I haven't found a solution to this yet. I'm in the middle up updating infra and will try again after.
One thing you could try: enable DB logging. Double-check that the SQL generated is what you expect.
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
7.2KMembers
View on DiscordWant results from more Discord servers?
More PostsSupabase branching w/ Drizzle?Does anyone know if it is possible to get Supabase branching working with Drizzle migrations? (httpsType inference is not working when findFirst is extractedHey typescript wizards, could anyone spot what I'm doing wrong here?
```ts
type OrgTableQueryParamsDrizzle Query, Relationship Sub-QueryI have Domains and Products, and a pivot between them (DomainProducts).
I'd like to query (`findFirMariaDB driver and generate migrationsThe company im working for insists on using MariaDB but im having issues generating migrations for mNaming Migrationshow do i set a name for a new migration when running `drizzle-kit generate:mysql` ? i tried setting [postgres][zod] createInsertSchemaHey! Trying to make my Sveltekit form schema.
Here is my example:
```export const userAccessesFormSUse schema definition as normal typesI want to use my schema definition as a normal type. Basically what .select().from() returns - plainWhat is a recommended way to execute migration on CI ?Build facilities for migration assume it happens during app execution I don't sure it a good idea anStruggling when changing tables relationships or columnsI find myself getting errors such as quite regularly
[cause]: [ResponseError: SQLite error: no suchHow can I get rid of the buffer object returned when using Magical sql operator?This is and example of how I execute the query:
```ts
const id = 69;
await db.execute(sql`select * f