Skip to content
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

sqlx-cli database reset fix confirmation flag #1128

Merged
merged 1 commit into from
Apr 9, 2021
Merged

sqlx-cli database reset fix confirmation flag #1128

merged 1 commit into from
Apr 9, 2021

Conversation

qqwa
Copy link
Contributor

@qqwa qqwa commented Mar 21, 2021

sqlx database reset currenctly requires no confirmation and a
confirmation when -y flag is set. Should be the other way around
as it is for sqlx database drop. This commit fixes this.

sqlx database reset currenctly requires no confirmation and a
confirmation when -y flag is set. Should be the other way around
as it is for sqlx database drop. This commit fixes this.
@abonander
Copy link
Collaborator

I'm certainly inclined to merge this but since it's technically a breaking change to the behavior I think this needs to be part of 0.6, which I'm not sure if we want to release in lockstep with the rest of SQLx 0.6 or not.

@jplatte
Copy link
Contributor

jplatte commented Apr 2, 2021

I definitely would not consider this a breaking change. It doesn't affect the main crate and it also seems super unlikely that there is code out there relying on the current behavior (sqlx db reset seems like the kind of command you only ever run manually, not as part of a script).

@abonander
Copy link
Collaborator

On the contrary, I actually have reset-db.sh in a few projects that runs sqlx db reset and then inserts a bunch of test data from SQL files as a baseline for a development instance of the given application. That script is checked into a git repo that's used by a half dozen different developers now.

Granted, you do have to update the binary manually since we don't have it in any package managers yet, but still I've been bitten in the butt by assuming no one would be affected by such a seemingly innocuous change before.

@jplatte
Copy link
Contributor

jplatte commented Apr 2, 2021

Is that script being run outside a tty? If not, it will continue to work, just with the confirmation, right?

@mehcode
Copy link
Member

mehcode commented Apr 9, 2021

I think this is a breaking change, but I was planning to bump sqlx-cli to 0.5.2 to keep it lock-step with the rest of SQLx. So this works. 👿

@mehcode mehcode merged commit fc6eb63 into launchbadge:master Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants