Hey folks - trying to migrate from the
Hey folks - trying to migrate from the previous
setupDevBindings
to the new setupDevPlatform
- I've got it working except it seems to not be pointing at the correct local sqlite DB for the D1 driver.
This was my previous config file, have I not specified the wrangler toml correctly?
10 Replies
Its just creating a new blank DB when I run this code, so I must have the settings mixed up
I suspect D1 should be an array of objects, not just an object - but if you're saying it works but not exactly how it should then I'm not sure.
Hmm yeah, its connecting fine, Just to the wrong DB
I might just rename the files, but I'd like to know if my config is wrong

At a glance, the databaseId and databaseName options seem exclusive

This is how the setupDevBindings builds a configuration to pass to Wrangler
This might be the same bug(?) that Miniflare had before.
Try this
So I should only pass ID?
Yeah
With Miniflare, you pass both - setupDevBindings only supports one or the other.
In this case, it doesn't see your ID - it only sees the database name.
hmm okay thanks