problem with d1 locally
I am developing several workers that will use the same D1 but locally each one creates a different database instead of sharing the same one already created. I put the same database_id in both but it creates different dbs locally


2 Replies
Is there any way to share the same database locally?
Yes, I was reading about that but it doesn't say how to specify the local db in the other worker.
https://developers.cloudflare.com/d1/build-with-d1/local-development/#persist-data
i've added this in both projects but when i run migrations this run over .wrangler/state.../d1 .sqlite
Cloudflare Docs
Local development | Cloudflare D1 docs
D1 has fully-featured support for local development, running the same version of D1 as Cloudflare runs globally. Local development uses Wrangler, the command-line interface for Workers, to manage local development sessions and state.