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.
@@ -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?,
},
