Skip to content

Commit

Permalink
Fixed force dropping bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Vrajs16 committed Nov 21, 2023
1 parent fda4159 commit 72b845e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sqlx-postgres/src/migrate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ impl MigrateDatabase for Postgres {

conn.execute(&*format!(
"SELECT pg_terminate_backend(pg_stat_activity.{pid_type}) FROM pg_stat_activity \
WHERE pg_stat_activity.datname = {} AND {pid_type} <> pg_backend_pid()",
database.replace('"', "\"\""),
WHERE pg_stat_activity.datname = '{database}' AND {pid_type} <> pg_backend_pid()"
))
.await?;

Expand Down

0 comments on commit 72b845e

Please sign in to comment.