2 ms·
What I mean is that workers cannot create databases. You have to create each database using wrangler (or the UI) and then edit the configuration file to add a b
by fauigerzigerk 3y ago
What I mean is that workers cannot create databases. You have to create each database using wrangler (or the UI) and then edit the configuration file to add a binding. The binding becomes a variable in the JavaScript environment, which means you have to change the source code every time a new database is created.
Therefore, creating a database per user as part of the user signup flow is not possible.
- ibejoeb 3y agoAh, I see. I thought it would be possible to dynamically set a secret which would effectively be a database uri. But upon further investigation, it does indeed need a redeploy. I suppose you could make something to write the bindings to the toml and trigger a redeploy, but that's definitely not pretty.