diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2020-01-10 12:17:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-10 12:17:22 +0000 |
commit | 1d16f5ea0e1329b7613336a8c15b245513579bbd (patch) | |
tree | a263385a214bed54afb99d803e6d262fa9a40009 /synapse/storage/engines/sqlite.py | |
parent | Merge branch 'master' of github.com:matrix-org/synapse into develop (diff) | |
parent | update install notes for CentOS (diff) | |
download | synapse-1d16f5ea0e1329b7613336a8c15b245513579bbd.tar.xz |
Merge pull request #6675 from matrix-org/rav/die_sqlite37_die_die_die
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 df039a072d..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, txn): - 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 |