diff options
author | Richard van der Hoff <richard@matrix.org> | 2020-01-09 17:46:52 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2020-01-09 18:11:04 +0000 |
commit | bf468211805900e767b6b07a2bfa6046f70efb7a (patch) | |
tree | d6dacf0d5eeb1218889f5bb8919869a25131fab0 /synapse/storage/engines/sqlite.py | |
parent | Check postgres version in check_database (diff) | |
download | synapse-bf468211805900e767b6b07a2bfa6046f70efb7a.tar.xz |
Refuse to start if sqlite is older than 3.11.0
Diffstat (limited to 'synapse/storage/engines/sqlite.py')
-rw-r--r-- | synapse/storage/engines/sqlite.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/storage/engines/sqlite.py b/synapse/storage/engines/sqlite.py index 3b3c13360b..cbf52f5191 100644 --- a/synapse/storage/engines/sqlite.py +++ b/synapse/storage/engines/sqlite.py @@ -53,8 +53,11 @@ class Sqlite3Engine(object): """ return False - def check_database(self, db_conn): - pass + def check_database(self, db_conn, allow_outdated_version: bool = False): + if not allow_outdated_version: + version = self.module.sqlite_version_info + if version < (3, 11, 0): + raise RuntimeError("Synapse requires sqlite 3.11 or above.") def convert_param_style(self, sql): return sql |