Cloudflare DevelopersCD
Cloudflare Developers17mo ago
2 replies
Zeeshan

how to use production d1 db in local

hi folks, i'm new to db world i have my d1 database defined in format on my
wrangler.toml
file.
[[d1_databases]]
binding = "CB_DB"                                    # i.e. available in your Worker on env.DB
database_name = "cherry-blossom"
database_id = db id here

I'm able to use it on deployed link but when on local host. when i query using d1 syntax or even drizzle, i get error D1_ERROR: no such table: products: SQLITE_ERROR

is there a workaround for it?
Was this page helpful?