Skip to content

🐛 BUG: Confusing messaging about whether wrangler d1 migrations apply is running against local vs remote DB #7657

@robmv

Description

@robmv

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:

Your database may not be available to serve requests during the migration, continue?

The remote or local status of the database is only shown after confirmation:

Executing on local database DB

Please provide any relevant error logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    d1Relating to D1documentationImprovements or additions to documentationenhancementNew feature or requestquick winPotentially easy/straightforward issue to tackle

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions