For Workers & Pages, what is the name of the domain?
n/a
What is the error number?
n/a
What is the error message?
n/a
What is the issue or error you’re encountering
I noticed that npx wrangler d1 commands default to production. For example if I run npx wrangler d1 create test-db on my local macbook pro terminal, it creates the table in my production CF account. I find it hard to believe that cloudflare would allow this, so my default assumption is I must be doing something wrong. Why does running that command default to production instead of local?
wrangler d1 create does target remote, because there’s not really a concept of “creating” DBs locally. They’ll be created when you spin up the local dev server in your .wrangler folder if you have them in your wrangler config.
execute, export, etc. do target local first though.