diff options
author | Andrew Morgan <andrewm@element.io> | 2022-08-08 14:11:34 +0100 |
---|---|---|
committer | Andrew Morgan <andrewm@element.io> | 2022-08-08 14:11:34 +0100 |
commit | 2edc839c2369c16fed17d35623bf7a94afd2ef8f (patch) | |
tree | 6779226e0f1d48ca67de8622eafff2601de38dcd | |
parent | Raise a ValueError if keyvalues is falsely (diff) | |
download | synapse-anoa/simple_delete_all.tar.xz |
Switch to f-strings github/anoa/simple_delete_all anoa/simple_delete_all
-rw-r--r-- | synapse/storage/database.py | 4 |
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) |