Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Don't require sqlite3 when using postgres #4466

Merged
merged 3 commits into from Jan 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/4466.misc
@@ -0,0 +1 @@
Synapse will now take advantage of native UPSERT functionality in PostgreSQL 9.5+ and SQLite 3.24+.
3 changes: 1 addition & 2 deletions synapse/storage/engines/sqlite.py
Expand Up @@ -15,7 +15,6 @@

import struct
import threading
from sqlite3 import sqlite_version_info

from synapse.storage.prepare_database import prepare_database

Expand All @@ -37,7 +36,7 @@ def can_native_upsert(self):
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
Expand Down