1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/database.py b/synapse/storage/database.py
index 70b5601a12..6266385ad2 100644
--- a/synapse/storage/database.py
+++ b/synapse/storage/database.py
@@ -2242,10 +2242,10 @@ class DatabasePool:
table: The name of the table to delete all rows from.
"""
if isinstance(txn.database_engine, PostgresEngine):
- sql = "TRUNCATE %s" % table
+ sql = f"TRUNCATE {table}"
else:
# SQLite does not support the TRUNCATE command
- sql = "DELETE FROM %s" % table
+ sql = f"DELETE FROM {table}"
txn.execute(sql)
|