-
Notifications
You must be signed in to change notification settings - Fork 756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 BUG: Confusing messaging about whether wrangler d1 migrations apply
is running against local vs remote DB
#7657
Comments
Hiya, I think this is actually a case of confusing UI (not good either!), but the default is local based on my testing + looking through our codebase.
Separately, I'm a bit confused by your description, not sure if I've misunderstood - if you haven't logged in with wrangler, how have you been able to create a d1 database? Currently you have to create a DB linked to an account first before being able to develop locally (this is a limitation we're working to remove!). |
wrangler d1 migrations apply
wrangler d1 migrations apply
is running against local vs remote DB
Interesting but when I run with --local, no online db confirmation is done, and as the documentation says --local is the default, doing something different to what --local does looks incongruent.
Yes, a message before the confirmation prompt instead of after would be helpful. I expect that wrangler could do all development locally, if my tests makes us expand to more developers, I want all of them to be able code locally without a single Cloudfare login prompt.
That restriction looks like is already fixed, because I am not logged in right now, and I tested my first DB migration, my first query and I have:
The only setting I added was to
|
Ah yeah fair enough you can definitely just put in a temp id and name currently :) Re main issue: when |
Which Cloudflare product(s) does this pertain to?
D1, Workers Runtime
What versions are you using?
3.99.0 Wrangler 2.11.0 Node.js
What operating system and version are you using?
Fedora Linux
Please provide a link to a minimal reproduction
No response
Describe the Bug
I am on first stage development, not a single worker has been deployed, so I have never logged in with wrangler. Running
npx wrangler d1 migrations apply DB
and it immediately opens the OAuth web page for authentication so it is trying to run the migrations on remote database.The documentation states that
--local
is default true but I still need to add it in order to run it on a local database. It is extremely dangerous that the default doesn't match the documentation.It would be helpful if the local or remote status of the operation to be shows the confirmation message:
The remote or local status of the database is only shown after confirmation:
Please provide any relevant error logs
No response
The text was updated successfully, but these errors were encountered: