mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 20:34:59 -04:00
Make sqlite database migrations transactional again (#14910)
#13873 introduced a regression which causes sqlite database migrations to no longer run inside a transaction. Wrap them in a transaction again, to avoid database corruption when migrations are interrupted. Fixes #14909. Signed-off-by: Sean Quah <seanq@matrix.org>
This commit is contained in:
parent
b15f0758e5
commit
a63d4cc9e9
3 changed files with 7 additions and 2 deletions
|
@ -132,6 +132,9 @@ class BaseDatabaseEngine(Generic[ConnectionType, CursorType], metaclass=abc.ABCM
|
|||
"""Execute a chunk of SQL containing multiple semicolon-delimited statements.
|
||||
|
||||
This is not provided by DBAPI2, and so needs engine-specific support.
|
||||
|
||||
Some database engines may automatically COMMIT the ongoing transaction both
|
||||
before and after executing the script.
|
||||
"""
|
||||
...
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue