[BUG]: [durable-sqlite] DrizzleError: Rollback when working with @cloudflare/vite-plugin #4558
Open
1 task done
Labels
bug
Something isn't working
Report hasn't been filed before.
What version of
drizzle-orm
are you using?0.43.1
What version of
drizzle-kit
are you using?0.31.1
Other packages
No response
Describe the Bug
I'm trying to get drizzle to work with the storage in Cloudflare Durable Objects, while using the @cloudflare/vite-plugin as is recommended by Cloudflare.
With some finagling, I was able to get past most errors, but am now stuck with an error that looks as follows:
That last stackframe points to my code, where I'm calling
migrate
:I used a tip from #3865 and removed the try/catch in the migrate function in my node_modules to see the actual cause of the error, and got the following:
I'm now at a loss about how to proceed. I'm passing in
ctx.storage
todrizzle(...)
as shown above, which is what the docs say, so it should have a valid DB to work against. I'm not sure why it would fail to run the query.Worth noting: I've modified the
migration.js
file toimport ... from '....sql?raw';
ie, I've added the?raw
to make it get imported as a string, as described here. Without that I get a parsing error thrown by Rollup.Happy to help debug the issue in any way. Thanks!
The text was updated successfully, but these errors were encountered: