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

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

~migrations broke??~ i can't read

did the migrations script break for anyone? I got a github action that always runs d1 migrations apply <DB> and it always did a check to see if there where any new migrations to apply and applied them (if none, then did nothing). but since my last commit ~30 mins ago, it started applying them all over again (not just the new ones)...

DO/D1 smart placement

If it is 1 -10 ms latency, thats wonderful. Based on the earlier conversations we have had regarding about DO locations (where do DO live links), DO's are available only in a few DC (For example SGA for an Indian audience). And the minimal latency for DO location from MUmbai would be 200 ms according to the web site. I am making some assumptions here a. That the D1 replicas when they come into pic after Q1 would still live near SGA like locations due to colo reqs 2. Not just initial connections...

hello here,this change about `.run` I

hello here,this change about .run I have updated the types and wrangler and I still see that run returns a D1Response. What I am missing?

Nevermind team, I found a workaround, so

Nevermind team, I found a workaround, so apparently, what causes the "not authorized" issue is that I am using TEMPORARY in creating the table, what I did to fix the problem was remove the TEMPORARY keyword then just DROPped the temp_stocks afterwards. this is fixed.. just a reference for anyone who might encounter it and for devs to find a fix for it if it isn't intended to behave that way..

Is there an outage with the D1 API right

Is there an outage with the D1 API right now? The databases work when queried, but can't access them on the dash and errors when trying to apply a migration....
No description

Hi there. Sorry in advance for the noob

Hi there. Sorry in advance for the noob question. Does binding values have to be unique when using the Wrangler CLI / wrangler.toml config? E.G: if I have multiple environments, that I want to connect to different D1 databases. ...

Hello I need help with next-on-pages, I

Hello I need help with next-on-pages, I have a remote D1 database, and added it locally too. I did some migration with drizzle and everything worked fine and the data persisted locally to a sqlite file (say X). But when I follow the steps in next-on-pages/next-dev to use bindings inside next.js app, it does not use the file X, instead, it creates new file Y which has no migrations. Any solutions to his behavior? I tried to see if there is a way to make the next.js local binding use file X but I...

D1 with NextJS

Hey, I don't know if someone can help me understand how best to integrate D1 with NextJS. I am confused between whether I should be using a separate Worker, or if I should be using a binding directly in the Page (web app).

For larger databases, Hyperdrive is

For larger databases, Hyperdrive is probably going to be a better fit: https://developers.cloudflare.com/hyperdrive/

1. That is the limit in beta, but it

1. That is the limit in beta, but it will go up. The base included in workers paid is 5gb, then charged every gig after. Up in this thread https://discord.com/channels/595317990191398933/992060581832032316/1190019895254069258 Matt mentioned about a (currently TBA, but planned for an eventual) >100GB limit

Deploy a Next.js site · Cloudflare Pages...

I'm using Next.js created with create-next-app. When I start Next with commands like yarn dev, I want to use a local D1 created with npx wrangler d1 somecommand --local in api/foo/bar/route.ts. However, even after referring to the following page, I can't seem to bind it properly in my local environment. https://developers.cloudflare.com/pages/framework-guides/deploy-a-nextjs-site/#use-bindings-in-your-nextjs-application Is this an issue unique to my environment? Is there any way to fix this?...