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

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?

Alpha database migration guide · Cloudfl...

Hello , i am trying to perform an alpha database migration for one of my alpha databases , i followed this guide: https://developers.cloudflare.com/d1/platform/alpha-migration/#1-verify-that-a-database-is-alpha but i keep getting error Internal error: failed to run backup: Failed to query D1: D1 API returned: (500 Internal Server Error) {"error":"Error 9000: something went wrong","success":false} [code: 7500] when i run wrangler d1 backup command , any idea how to resolve this ?...

Can prepared statements bind arrays for `IN (?)`

does anyone know if prepared statements can be bound with arrays? i'm trying to do a query like db.prepare('SELECT * FROM table WHERE status IN (?)').bind(['active','expired']).all(), would that work?

Hey all, is something up with `wrangler

Hey all, is something up with wrangler d1 info + wrangler d1 insights? info is reporting 0 read queries in the past 24h (not the case unless it's somehow using some local version? The ID is the same as in my CF dash) insights is returning an empty array regardless of configuration...

Hello, I have had success with the D1 in

Hello, I have had success with the D1 in development all the way until production deployment. I have bound it using the updated syntax from docs (Pages). When i attempt to query when deployed, It crashes with Application Error. Works just fine in wrangler preview. AccountId: 77e1b1d919d86d253e4967517aab4437...

i'm getting `Error: D1_ERROR: D1 is

i'm getting Error: D1_ERROR: D1 is overloaded. Too many requests queued. for the last while. its a tiny little d1 database with no traffic

Are older d1 databases still 2gb? Mine

Are older d1 databases still 2gb? Mine just hit 2gb and stopped working

So I think I found a bug where simply

So I think I found a bug where simply looking at a D1 database in the dashboard causes a huge number of rows to be read. I have indexes for all of my queries and the high number of rows read is happening only when I pull up the database (simply looking at the table data).
No description

Importing a 13MB SQL File

Hi, I'm having trouble importing my database. I'm using `npx wrangler d1 execute --config packages/root/wrangler.toml --e production --remote --file "mydb.sql" mydb-prod-main While that works locally (with --local), it fails with a 504 Gateway timeout each time I try it... Any idea how to work around that? The .sql file is 13MB....
No description

only alpha dbs shouldn't have a usage

only alpha dbs shouldn't have a usage dashboard, what do you see?

what does it mean migrations are not run

what does it mean migrations are not run in production ?

To confirm: do you mean the DB and

To confirm: do you mean the DB and contents, or just the schema?

GitHub - mw10013/remix-auth-totp-cloudfl...

Yes, that works with remix+vite. I found that it’s not necessary to specify the bindings in the command line when running locally. Just let ‘remix vite:dev’ pick them up from wrangler.toml and include the local bindings in the wrangler.toml. I put together the cloudflare example for ‘remix-auth-totp’ that uses drizzle with d1 that has the local bindings in wrangler.toml. https://github.com/mw10013/remix-auth-totp-cloudflare-example

D1 local seed data

I'm not sure I understand what you're trying to do here, no queries/migrations will be run against your remote DB unless you explicitly add the --remote flag