mirror of
https://mau.dev/maunium/synapse.git
synced 2024-08-24 19:25:57 +00:00
Merge pull request #4471 from matrix-org/erikj/sqlite_native_upsert
Disable native upsert on sqlite
This commit is contained in:
commit
57c035debe
@ -1 +1 @@
|
|||||||
Synapse will now take advantage of native UPSERT functionality in PostgreSQL 9.5+ and SQLite 3.24+.
|
Synapse will now take advantage of native UPSERT functionality in PostgreSQL 9.5+.
|
||||||
|
1
changelog.d/4471.misc
Normal file
1
changelog.d/4471.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Synapse will now take advantage of native UPSERT functionality in PostgreSQL 9.5+.
|
@ -33,10 +33,14 @@ class Sqlite3Engine(object):
|
|||||||
@property
|
@property
|
||||||
def can_native_upsert(self):
|
def can_native_upsert(self):
|
||||||
"""
|
"""
|
||||||
Do we support native UPSERTs? This requires SQLite3 3.24+, plus some
|
Do we support native UPSERTs?
|
||||||
more work we haven't done yet to tell what was inserted vs updated.
|
|
||||||
"""
|
"""
|
||||||
return self.module.sqlite_version_info >= (3, 24, 0)
|
# SQLite3 3.24+ supports them, but empirically the unit tests don't work
|
||||||
|
# when its enabled.
|
||||||
|
# FIXME: Figure out what is wrong so we can re-enable native upserts
|
||||||
|
|
||||||
|
# return self.module.sqlite_version_info >= (3, 24, 0)
|
||||||
|
return False
|
||||||
|
|
||||||
def check_database(self, txn):
|
def check_database(self, txn):
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user