Cloudflare Developers

CD

Cloudflare Developers

Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news

Join

Is the D1 HTTP API down right now?

Is the D1 HTTP API down right now?

hi all. I am using import API for D1

hi all. I am using import API for D1 https://developers.cloudflare.com/api/operations/cloudflare-d1-import-database. Does anybody used it before and are any limits on the file size? I am getting 500 internal server all the time. Thank you

I switched and couldn't believe how easy

I switched and couldn't believe how easy it was and how beautiful multi-tenant works with Turso.

Thanks guys for this brainstorm.

Thanks guys for this brainstorm. Multiple independent DB's isn't something I can do. I needed one DB, with read and write replicas. Where the write happens also to the nearest DB but would eventually propagate to all others.

Do you have to use the REST API? Might

Do you have to use the REST API? Might be easier to use the D1 API in Workers directly.

Hi, I am having troubble setting up

Hi, I am having troubble setting up drizzle with the local d1 database, when running bun drizzle-kit migrate i receive the following error: ```bash $ bun db:migrate $ drizzle-kit migrate No config path provided, using default 'drizzle.config.ts'...

Anyone know why BLOB fields return

Anyone know why BLOB fields return number[] instead of ArrayBuffer? Seems weird because the docs show that they should map to ArrayBuffers.

I'm using nuxt + drizzle orm +

I'm using nuxt + drizzle orm + cloudflare D1. I can insert, delete, update data from drizzle studio (binded with D1), but I defined api and make api calls from by webapp page to perform those actions, it returns status 200 (OK) but nothing changes in database...

Hi folks. i have a bunch of data in a

Hi folks. i have a bunch of data in a csv file which i would like to dump into my table i d1 db. Which is the best way to do this? Seems like d1 doesn't support csv yet (cmiiw)

Hi All, I am facing an issue using D1

Hi All, I am facing an issue using D1 locally. The issue is my worker cannot see any of the DB objects I have created. First, I setup my DB with some DDL: wrangler d1 execute appdb-dev --local --file=./1.sql...

I am trying to follow the instructions

I am trying to follow the instructions and set up this DB environment variable in my nextjs app but I am stuck at the very first step.
No description

What are your thoughts of separate

What are your thoughts of separate databases? I have a users table in an auth database, but user-owned resources are in product-specific databases, making foreign key references impossible. 😦 Should I cave and put the tables in the same database so that I can have foreign keys on user IDs, or should I keep a separation of concerns to decrease the blast radius of a security incident?

hi all, i'm developing a worker that has

hi all, i'm developing a worker that has access to D1 databases through D1 database bindings (set as variables under D1 Database Bindings). how am i able to reach those databases when i'm developing locally? using queries like this: {results} = await env.IRADB.prepare(<here goes the query>).bind(<binds>).run();

Any recommendations for using d1 data

Any recommendations for using d1 data with an external analytics system like metabase?

Does `PRAGMA defer_foreign_keys=ON` not

Does PRAGMA defer_foreign_keys=ON not disable on update and on delete actions? Kinda weird when SQLite often requires recreating tables (and thus triggering those actions)

Yes, since those virtual tables reside

Yes, since those virtual tables reside in memory and require read operations. If you are on the free plan, you can’t be billed anything. If you are on the $5 paid plan, you will only be billed once you exceed 25 billion reads per month....

🤞 no data loss

🤞 no data loss

That seems like the current bookmark id

That seems like the current bookmark id - guessing it's disabled as it'd be a no-op

Also that you have to switch out the

Also that you have to switch out the configs manually

Or should I create an issue somewhere

Or should I create an issue somewhere else for this?