diff options
author | Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | 2019-01-25 11:25:02 +0000 |
---|---|---|
committer | Amber Brown <hawkowl@atleastfornow.net> | 2019-01-25 22:25:02 +1100 |
commit | 0b3fd1401fdebb944729cf46d6de9c3bff482933 (patch) | |
tree | 75d41a0651e5fd230af5459a3b5e311fcee1dd0b | |
parent | Merge pull request #4415 from matrix-org/anoa/full_search_upgraded_rooms (diff) | |
download | synapse-0b3fd1401fdebb944729cf46d6de9c3bff482933.tar.xz |
Don't require sqlite3 when using postgres (#4466)
-rw-r--r-- | changelog.d/4466.misc | 1 | ||||
-rw-r--r-- | synapse/storage/engines/sqlite.py | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/changelog.d/4466.misc b/changelog.d/4466.misc new file mode 100644 index 0000000000..58130b6190 --- /dev/null +++ b/changelog.d/4466.misc @@ -0,0 +1 @@ +Synapse will now take advantage of native UPSERT functionality in PostgreSQL 9.5+ and SQLite 3.24+. diff --git a/synapse/storage/engines/sqlite.py b/synapse/storage/engines/sqlite.py index c64d73ff21..059ab81055 100644 --- a/synapse/storage/engines/sqlite.py +++ b/synapse/storage/engines/sqlite.py @@ -15,7 +15,6 @@ import struct import threading -from sqlite3 import sqlite_version_info from synapse.storage.prepare_database import prepare_database @@ -37,7 +36,7 @@ class Sqlite3Engine(object): Do we support native UPSERTs? This requires SQLite3 3.24+, plus some more work we haven't done yet to tell what was inserted vs updated. """ - return sqlite_version_info >= (3, 24, 0) + return self.module.sqlite_version_info >= (3, 24, 0) def check_database(self, txn): pass |