Report hasn't been filed before.
What version of drizzle-orm are you using?
1.0.0-beta.20
What version of drizzle-kit are you using?
1.0.0-beta.20
Other packages
No response
Describe the Bug
Hi folks. I'm using drizzle in some project and catching up newest release.
I found drizzle-kit migrate fails when using it with Cloudflare D1.
I researched codebase:
- Remote SQLite like Cloudflare D1 doesn't support transaction and therefore drizzle has
sqlite-proxy module. In this module additional function batch is implemented.
- In migration process,
session.transaction called.
|
await session.transaction(async (tx) => { |
SQLiteRemoteSession implements transaction but it starts with begin statement. This is unsupported in Cloudflare D1.
|
override async transaction<T>( |
IMHO, there are two ways:
- use
batch in transaction(): modify sqlite-proxy/session.ts
- implement another
up-migration as up-migration/sqlite-proxy.ts and use it from sqlite-proxy/migrator.ts.
Do you have any plan to handle this?
Report hasn't been filed before.
What version of
drizzle-ormare you using?1.0.0-beta.20
What version of
drizzle-kitare you using?1.0.0-beta.20
Other packages
No response
Describe the Bug
Hi folks. I'm using drizzle in some project and catching up newest release.
I found
drizzle-kit migratefails when using it with Cloudflare D1.I researched codebase:
sqlite-proxymodule. In this module additional functionbatchis implemented.session.transactioncalled.drizzle-orm/drizzle-orm/src/up-migrations/sqlite.ts
Line 428 in 1a01082
SQLiteRemoteSessionimplementstransactionbut it starts withbeginstatement. This is unsupported in Cloudflare D1.drizzle-orm/drizzle-orm/src/sqlite-proxy/session.ts
Line 115 in 1a01082
IMHO, there are two ways:
batchin transaction(): modify sqlite-proxy/session.tsup-migrationasup-migration/sqlite-proxy.tsand use it fromsqlite-proxy/migrator.ts.Do you have any plan to handle this?