Re:How Figma's databases team lived to tell the scale
by ummonk on Friday March 15, 2024 @01:45PM
(#39718537)
They have said they're working on some sort of solution (which they intend to have available by the time D1 exists beta) that will allow some sort of dynamic bindings specifically to address this use case.
In the meantime, though it's not a great solution, one can create and query databases through the REST API instead https://developers.cloudflare.com/api/operations/cloudflare-...
Re:How Figma's databases team lived to tell the scale
by fauigerzigerk on Friday March 15, 2024 @03:54PM
(#39719983)
>They have said they're working on some sort of solution
That's great to hear, thanks!
You have to create each database manually using wrangler or the website. Then you have to create a binding for each database in wrangler.toml so that the database becomes accessible as a variable in your Workers code. Then you have to change your Worker source code to do something with that variable. Then you redeploy.
The issue is that Workers cannot create or list databases. There's no API for it.