mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 10:44:57 -04:00
Snapshot schema 72 (#13873)
Including another batch of fixes to the schema dump script
This commit is contained in:
parent
41461fd4d6
commit
0a38c7ec6d
13 changed files with 2165 additions and 22 deletions
|
@ -393,6 +393,14 @@ class LoggingTransaction:
|
|||
def executemany(self, sql: str, *args: Any) -> None:
|
||||
self._do_execute(self.txn.executemany, sql, *args)
|
||||
|
||||
def executescript(self, sql: str) -> None:
|
||||
if isinstance(self.database_engine, Sqlite3Engine):
|
||||
self._do_execute(self.txn.executescript, sql) # type: ignore[attr-defined]
|
||||
else:
|
||||
raise NotImplementedError(
|
||||
f"executescript only exists for sqlite driver, not {type(self.database_engine)}"
|
||||
)
|
||||
|
||||
def _make_sql_one_line(self, sql: str) -> str:
|
||||
"Strip newlines out of SQL so that the loggers in the DB are on one line"
|
||||
return " ".join(line.strip() for line in sql.splitlines() if line.strip())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue