Skip to content

Commit

Permalink
fix(launcher): wrap database name in quotes to allow non-alpha symbol…
Browse files Browse the repository at this point in the history
…s in the database names
  • Loading branch information
rimrakhimov committed Dec 4, 2024
1 parent 3f8a791 commit d4a0373
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/blockscout-service-launcher/src/test_database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl TestDbGuard {
tracing::info!(name = db_name, "creating database");
db.execute(Statement::from_string(
db.get_database_backend(),
format!("CREATE DATABASE {db_name}"),
format!("CREATE DATABASE \"{db_name}\""),
))
.await?;
Ok(())
Expand All @@ -116,7 +116,7 @@ impl TestDbGuard {
tracing::info!(name = db_name, "dropping database");
db.execute(Statement::from_string(
db.get_database_backend(),
format!("DROP DATABASE IF EXISTS {db_name} WITH (FORCE)"),
format!("DROP DATABASE IF EXISTS \"{db_name}\" WITH (FORCE)"),
))
.await?;
Ok(())
Expand Down

0 comments on commit d4a0373

Please sign in to comment.