summary refs log tree commit diff
path: root/synapse/storage/engines/sqlite.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2019-02-27 10:21:49 +0000
committerGitHub <noreply@github.com>2019-02-27 10:21:49 +0000
commitf191be822b265b50339e17b2d95125f43dc700b3 (patch)
treedc8948e39cc603fa82deddf12b47a4b756910ca3 /synapse/storage/engines/sqlite.py
parentFix check-newsfragment script (#4750) (diff)
downloadsynapse-f191be822b265b50339e17b2d95125f43dc700b3.tar.xz
Add database version to phonehome stats. (#4753)
Diffstat (limited to 'synapse/storage/engines/sqlite.py')
-rw-r--r--synapse/storage/engines/sqlite.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/storage/engines/sqlite.py b/synapse/storage/engines/sqlite.py
index 059ab81055..1bcd5b99a4 100644
--- a/synapse/storage/engines/sqlite.py
+++ b/synapse/storage/engines/sqlite.py
@@ -70,6 +70,15 @@ class Sqlite3Engine(object):
             self._current_state_group_id += 1
             return self._current_state_group_id
 
+    @property
+    def server_version(self):
+        """Gets a string giving the server version. For example: '3.22.0'
+
+        Returns:
+            string
+        """
+        return "%i.%i.%i" % self.module.sqlite_version_info
+
 
 # Following functions taken from: https://github.com/coleifer/peewee