sqlx-cli database reset fix confirmation flag

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.
This commit is contained in:
Benjamin Bäumler 2021-03-21 13:53:01 +01:00 committed by Ryan Leckey
parent 674d89bbab
commit fc6eb6363b

View file

@ -42,7 +42,7 @@ pub async fn run(opt: Opt) -> anyhow::Result<()> {
DatabaseCommand::Create => database::create(&database_url).await?,
DatabaseCommand::Drop { yes } => database::drop(&database_url, !yes).await?,
DatabaseCommand::Reset { yes, source } => {
database::reset(&source, &database_url, yes).await?
database::reset(&source, &database_url, !yes).await?
}
DatabaseCommand::Setup { source } => database::setup(&source, &database_url).await?,
},