From 0bc41c430a6861b0deea76f06c74965c89fddfe6 Mon Sep 17 00:00:00 2001 From: imterah Date: Thu, 26 Dec 2024 18:26:26 -0500 Subject: [PATCH] fix: Fixes PostgreSQL database deletion. --- backend/api/backup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/api/backup.go b/backend/api/backup.go index ede7b09..f53cbe7 100644 --- a/backend/api/backup.go +++ b/backend/api/backup.go @@ -174,7 +174,7 @@ func backupRestoreEntrypoint(cCtx *cli.Context) error { log.Info("Dropping database...") - _, err = db.Query(context.Background(), "DROP DATABASE $1", postgresDB) + _, err = db.Query(context.Background(), fmt.Sprintf("DROP DATABASE %s", pgx.Identifier{postgresDB}.Sanitize())) if err != nil { return fmt.Errorf("failed to drop database: %s", err.Error())