You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature Request: First-class support for multiple D1 databases #746
Hello! It would be great to have better support for multiple Cloudflare D1 databases in Void.
According to [Cloudflare's documentation](https://developers.cloudflare.com/d1/platform/limits/), D1 is designed to scale horizontally across multiple smaller databases. Sharding and splitting data across databases help work around limitations such as the 10 GB database size limit and single-threaded query execution.
Void already supports connecting to additional D1 databases through createDb(), but schema management and migrations seem to be built around a single database.
It would be nice to define multiple databases in void.config.ts, each with its own schema and migrations:
The CLI could then support selecting a specific database:
void db generate --database catalog
void db migrate --database catalog
void db push --database catalog
Ideally, this would also include properly typed Drizzle clients for each database and an easy way to apply the same migrations across multiple databases when sharding.
Of course, existing single-database projects should continue working without any changes.
Since using multiple databases is part of Cloudflare's recommended scaling approach for D1, I think having first-class support for it would be a great addition to Void.
Would this be something you'd consider supporting?
Fully agree, I have wanted this since the beginning. Also we shouldn't stop at just supporting multiple databases, we should also consider supporting multiple instances of all the Void CF bindings.
Activity
yangshun commentedon Nov 8, 2026
Fully agree, I have wanted this since the beginning. Also we shouldn't stop at just supporting multiple databases, we should also consider supporting multiple instances of all the Void CF bindings.