From 72b845e53640ff855fb798a6c914fbbf300cfdc8 Mon Sep 17 00:00:00 2001 From: Vraj Shah Date: Tue, 21 Nov 2023 14:36:11 -0500 Subject: [PATCH] Fixed force dropping bug --- sqlx-postgres/src/migrate.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sqlx-postgres/src/migrate.rs b/sqlx-postgres/src/migrate.rs index 20473a7e15..fdd2dd6fe3 100644 --- a/sqlx-postgres/src/migrate.rs +++ b/sqlx-postgres/src/migrate.rs @@ -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?;