Skip to content

Conversation

@ttmx
Copy link

@ttmx ttmx commented Nov 5, 2025

Change DO SQLite migrate function to be in line with other existing sync SQL adapters

This change was motivated by noticing that the setup in Durable Objects was more complicated than required as seen in the docs.

Since migrate is currently async, it seems to require the usage of ctx.blockConcurrencyWhile in the setup step of the object, which introduces more things the user has to understand before using the drizzle with Durable Objects.
(In reality, I believe no microtasks are actually ever scheduled since no await is encountered inside migrate, so you wouldn't need to use ctx.blockConcurrencyWhile to guarentee the setup working, but the function being async makes it seem like you do)

I also intend to make a PR on the docs to simplify the setup for new users of Drizzle + Cloudflare Durable Objects.

Change DO SQLite migrate function to be in line with other existing sync SQL adapters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant