summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <andrewm@element.io>2022-08-08 14:11:34 +0100
committerAndrew Morgan <andrewm@element.io>2022-08-08 14:11:34 +0100
commit2edc839c2369c16fed17d35623bf7a94afd2ef8f (patch)
tree6779226e0f1d48ca67de8622eafff2601de38dcd
parentRaise a ValueError if keyvalues is falsely (diff)
downloadsynapse-anoa/simple_delete_all.tar.xz
-rw-r--r--synapse/storage/database.py4
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)